WAMP 服务器不显示图像
我遇到了一个问题,我不知道在谷歌中搜索什么。基本上我已经安装了 WAMP 服务器并安装了 OPen Cart
我可以在本地计算机上查看我的电子商务网站,但是当我在远程计算机上打开它时,它不会加载任何图像。它只显示文本
我的场景: 如果我加载 PHP 页面
它工作正常。我可以查看放在根目录中的 WAMP 服务器页面,但是当我加载
http:// 的电子商务页面时192.168.1.101/clothing/
它不会加载图像。就好像 PHP 脚本不起作用一样。 时,它在我的本地计算机上运行良好
的是,当我浏览http://127.0.0.1/clothing/
有趣 寻求任何帮助!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在
/config.php
中添加这些行(如果还没有):记下地址
192.168.1.101
和目录名称clothing
。每次重命名目录或从不同地址访问站点时都必须更改它。Add these lines (if isn't there yet) in
<opencart main directory>/config.php
:Note the address
192.168.1.101
and directory nameclothing
. You have to change it everytime you rename the directory or access your site from different address.链接是如何形成的?您可能需要更改它们,因为它们似乎与您的本地主机绑定在一起(即,图像可能已链接: http:// /127.0.0.1/image_file.jpg)而不是相对的(即./image_file.jpg) - 这可以解释为什么当您更改 IP 地址时它不会出现。
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.
我遇到了同样的问题,但我找到了解决方案,..是将要插入网页的图像保留到.folder.. C:\wamp\www
这样你的wamp服务器就可以找到定位的图像,然后这段代码将执行
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" >