I'm having a problem which I don't know what to search in google. Basically I have installed WAMP server and Installed OPen Cart
I am able to view my ECommerce site on my local computer but when I open it in on a remote computer it doesn't load any images. It only shows texts
My scenario: if I load the PHP page at
it works fine. I am able to view the WAMP server page which I put in the root directory but when i load the ecommerce pages at
http://192.168.1.101/clothing/
it doesn't load the images. As if the PHP scripts are not working on it. Funny thing is it works fine on my local machine when I browse
Thanks for any help!
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" >
来源:https://stackoverflow.com/questions/9240135/wamp-server-not-displaying-images