CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Problems with relative paths in script

 



Merlin
journeyman

Nov 29, 2000, 4:45 PM

Post #1 of 4 (183 views)
Problems with relative paths in script Can't Post

I'm having trouble with relative paths in some of my scripts. I'm using a script in /cgi-bin that's called with a HTML form from another dir called /gestion. In the script, I do a HTML print of images that are stored in /images_script. So, I was guessing that I could just use a relative path in the printed IMG tag in the script like ../images_script/image.gif but the image doesn't show up... Is there something special about this I should know? Thanks!


sleuth
Enthusiast

Nov 30, 2000, 9:29 AM

Post #2 of 4 (183 views)
Re: Problems with relative paths in script [In reply to] Can't Post

 
Yea, your server admin doesn't have relative paths enabled, It's a server configuration. Mine are also off yet I can do this,

<img src="/images/image.gif">

And it works fine, just take off the leading dots and it should work. Note that in perl, that won't work, it's a feature build into browsers, if the base domain is perlguru.com, it will just stick that in front of the path for you.

Sleuth


Merlin
journeyman

Dec 6, 2000, 1:44 PM

Post #3 of 4 (183 views)
Re: Problems with relative paths in script [In reply to] Can't Post

Well, I would think the same thing but I have other images in the same script that DO work which is kinda weird... Do you know in this case what's up? I guess the admins can't have partially enabled relative paths??? ;) Thx!


sleuth
Enthusiast

Dec 6, 2000, 1:54 PM

Post #4 of 4 (183 views)
Re: Problems with relative paths in script [In reply to] Can't Post

 I found out that the BROWSER is what takes care of the partial paths for the images, not the server, so ../ doesn't exist to the browser. Have you asked your admin yet? I think they'd have a better answer than I do.

Sleuth

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives