Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

src absolute path problem

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!

like image 458
luca Avatar asked Mar 01 '11 17:03

luca


People also ask

What is an src path?

The source path specifies the directories where the C and C++ source files are located. If you are debugging a user-mode process on the computer where the executable file was built, and if the source files are still in their original location, the debugger can automatically locate the source files.

How do I find the IMG src in HTML?

Example: src="img_girl. jpg". If the URL begins with a slash, it will be relative to the domain. Example: src="/images/img_girl.


1 Answers

You should be referencing it as localhost. Like this:

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

like image 143
rlb.usa Avatar answered Sep 24 '22 07:09

rlb.usa