src绝对路径问题

src绝对路径问题

问题描述:

我在 C:\wamp\www\\\\\\\ 中有一个图像,我尝试用下面的方式在页面中显示它:

I have an image in C:\wamp\www\site\img and i try to display it in a page with this:

<img src="C:\wamp\www\site\img\mypicture.jpg"/>

但它不工作。文件实际上存在,如果我尝试用相对路径我得到了图片

but it's not working.The file is actually there and if I try to refer to it with a relative path i got the picture

<img src="../img/mypicture.jpg">

错误在哪里?我在想什么?
再次感谢你们!

where is the error?what am I missing?? thank you again guys!

您应该将它引用为 localhost 。像这样:

You should be referencing it as localhost. Like this:

< img src =http:\\ localhost \site\img\mypicture.jpg/ >