简体   繁体   中英

Upload file not working when using ip address instead of localhost

When i try to upload an image in my project using localhost it's working but when i try to use my IP address instead it's not working. For example, I tried the following:

 localhost/my-project/upload 

Which works. However,

 192.192.52.2/my-project/upload 

does not work.

Are there any solutions for this issue?

So can anyone tell me what should be the issue when using IP address instead of localhost in php.

Try this. First go to your folder.
Example:

Open  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.
|
*/



or



/*

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM