我目前正在尝试使用相对路径显示图像,但它不工作!我尝试的路径是:相对路径不显示的图像
pictures/picture.png
然而它总是说图像不存在。然后,我甚至会尝试:
sitename/profiles/pictures/picture.png
仍然不起作用。然后我终于尝试:
http://localhost/sitename/profiles/pictures/picture.png
它终于起作用了。我试图像这样显示:
<img src="pictures/picture.png" />
为什么相对路径不能工作?请帮忙!!! :(
UPDATE 这里是我的directorys:
Sitename
Profiles
Pictures
image.png
ProfilesPicture <--- Where I want to run the image
在工作路径有一个文件夹'型材/'。你必须把它包含到相对路径中。 – emmanuel 2015-03-08 22:03:04
不起作用:( – 2015-03-08 22:03:50
这是您使用该图像的页面的URL? – Oriol 2015-03-08 22:05:51