Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Absolute path

Absolute path

Reply
  #1  
Old 06-19-09, 07:39 AM
jp50 jp50 is offline
Newbie Coder
 
Join Date: Dec 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Absolute path

Hi to all,
After a quick , unsuccesful search about my problem I decided to ask you guys to help me.I'm using absolute path for the images like
Quote:
/img_folder/img.png
and it works fine in IE and Mozilla but not in Safari. If I change the absolute path in
Quote:
C:/site-root/mysite/img_folder/img.png
then it works in IE,Safari but not in Mozilla.The question is: is there a way for an absolute path that is supported by the major browsers?
Thanks
Reply With Quote
  #2  
Old 06-22-09, 12:32 AM
=OTS=G-Man =OTS=G-Man is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
well your absolute path would be like

http://www.mysite.com/img_folder/img.png

not putting the domain in is call the relative path.

having the leading / says from the sites root where as no leading / is saying starting in the current folder

so for yours looks like you need to have <img src="img_folder/img.png" /> and that would end up looking like http://www.mysite.com/mysite/img_folder/img.png to the browser

so it all depends on your folder structure and where your calling it from.

and using the full system path will only work on your system. on from the internet

hope that makes since.
Reply With Quote
  #3  
Old 06-23-09, 08:34 AM
jp50 jp50 is offline
Newbie Coder
 
Join Date: Dec 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Yes,it makes sense and it works.Instead of the system path,now I put http://www.mysite/img_folder/omg.gif and all works fine.
Thank you.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with absolute path and relative path samot PHP 4 11-13-08 11:12 PM
Absolute URL in place of Absolute Path? d00d PHP 2 08-29-08 11:12 PM
[SOLVED] How to find the full path of curent page? adrianTNT PHP 6 06-09-08 10:11 AM
Image Path ahmad_iam ASP.NET 3 02-28-08 09:21 AM
getting the path to cgi-bin abtimoteo Perl 1 09-04-05 02:25 AM


All times are GMT -5. The time now is 02:02 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 (Unregistered)