我目前正在嘗試使用相對路徑顯示圖像,但它不工作!我嘗試的路徑是:相對路徑不顯示的圖像
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
這是您使用該圖像的頁面的URL? – Oriol 2015-03-08 22:05:51