src绝对路径问题 [英] src absolute path problem
本文介绍了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/ >
这篇关于src绝对路径问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文