[英]Upload file not working when using ip address instead of localhost
当我尝试使用本地主机在项目中上载图像时,它可以工作,但是当我尝试使用IP地址而不起作用时,则无法工作。 例如,我尝试了以下方法:
localhost/my-project/upload
哪个有效。 然而,
192.192.52.2/my-project/upload
不起作用。
这个问题有解决方案吗?
因此,谁能告诉我在PHP中使用IP地址而不是localhost时应该出什么问题。
Try this. First go to your folder. Example: (C:)xampp/htdocs/yourfoldername/application/config/config.php Open config.php. And add this /* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL, | WITH a trailing slash: | | http://example.com/ | | If this is not set then CodeIgniter will guess the protocol, domain and | path to your installation. | */ $config['base_url'] = 'http://192.192.52.2/yourfoldername/'; or $config['base_url'] = 'http://192.192.52.2/my-project/upload/'; /*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.