【发布时间】:2010-08-28 07:22:55
【问题描述】:
我在 Mac 上运行 apache。我的文档根文件夹是 /Library/WebServer/Documents。当我在 Documents 文件夹下创建新的子文件夹时,我无法从该子文件夹加载图像。
我的/Library/WebServer/Documents/test下的html文件是:
<html>
<body>
<h1>Test</h1>
<img src="http://localhost/test/angry.gif"/>
</body>
</html>
angered.gif 文件位于 test/ 文件夹下。我也执行 chmod -R 777 test/ 但似乎效率不高。
有什么建议吗?
安德烈
【问题讨论】:
-
您是否尝试使用 url ttp://localhost/test/angry.gif 直接访问
angry.gif? -
我认为如果您将 HTML 文件和图像文件放入您的子文件夹
/Library/WebServer/Documents/test,那么您可以在浏览器中查看 HTML 文件,但不能查看图像文件。对吗?