Hi folks,
I am a PHP programmer. I am having a problem with image tag. I need to know the difference and the purpose of using an image tag like this
<img src="/images/new.jpg>" , <img src="images/new.jpg"> and <img src="../images/new.jpg"> i am facing a problem because of this, i am editing an existing website in which the src or href of image, style, anchor tags etc., are written like this src="/images/someimage.jpg" , when i click a link it goes up one level say for eg: the page i am in was www.demo.com/user/list/index.php. When i click a link with "new.php" it goes like this www.demo.com/user/index.php. it comes out of the link folder. Actually this site is an existing site running site well and good. but now i am configuring it in a new web server its not running for me. Please advice ASAP.
Recommended Answers
Jump to PostI need to know the difference and the purpose of using an image tag like this
<img src="/images/new.jpg>" , <img src="images/new.jpg"> and <img src="../images/new.jpg">Say for example you are in "home" directory. In home directory, there is another directory called "images".
You want to display an image called "new.jpg" which …
Jump to PostThanks for your reply,
I just want to know the difference between <img src="images/new.jpg"> and <img src="/images/new.jpg"> tag format, also I belive <img src="/images/new.jpg"> and <img src="../images/new.jpg"> are same. I am an experienced programmer so i know some basics in images.
Please advice./ this folder
../ up one folder
…
All 5 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.