WAMP Server not displaying images

别说谁变了你拦得住时间么 提交于 2019-12-02 06:01:41

Add these lines (if isn't there yet) in <opencart main directory>/config.php :

// HTTP
define('HTTP_SERVER', 'http://192.168.1.101/clothing/admin/');
define('HTTP_CATALOG', 'http://192.168.1.101/clothing/');
define('HTTP_IMAGE', 'http://192.168.1.101/clothing/image/');

// HTTPS
define('HTTPS_SERVER', 'http://192.168.1.101/clothing/admin/');
define('HTTPS_IMAGE', 'http://192.168.1.101/clothing/image/');

Note the address 192.168.1.101 and directory name clothing. You have to change it everytime you rename the directory or access your site from different address.

How are the links formed? You probably need to alter them as it seems that they are tied to your localhost (ie. maybe images are linked: http://127.0.0.1/image_file.jpg) rather than being relative (ie. ./image_file.jpg) - which would explain why it isn't appearing when you change IP addresses.

I had same problem but i found the solution,..is that the image which you want to insert into your web page keep into.folder.. C:\wamp\www so in this way your wamp server can find the located image then this code will execute<img src="exapmle.jpg" width="400" height="500" >

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!