Forum Moderators: open

Message Too Old, No Replies

Referring up one folder - my brain is dead

         

draggar

5:59 pm on Mar 15, 2007 (gmt 0)

10+ Year Member



If I have a page in www.example.com/stuff/(page) and I need to show am image in the www.example.com/(image) , is it (with the tags) img src="../(image)"? I would just put in the whole URL, but that seems to slow down site loading.

Now, say I want the same page to load up an image in the www.example.com/images/(image) folder, would it be img src="../images/(image)"?

The sad thing is that I used to know this and use it all the time, but now age seems to be catching up to me and I can't remember for the life of me how to do it.

Along with the straight jacket, could I have a walker? :)

draggar

6:07 pm on Mar 15, 2007 (gmt 0)

10+ Year Member



I want to do this to easily manage a web community I'm constructing and I use CSS along with the PHP require () command for easy editing (just edit one page when I need to add a link, not 20 pages).

So, question #2, eventhough it wouldn't be HTML based, would a require ('../(file)') command for a link page act as if the the link is going to from where the link is or the current page?

Robin_reala

6:24 pm on Mar 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you've got it right on both counts. '../' means go back up a directory. For what it's worth, './' means stay in this directory and '/' on its own means go back to the root directory.

draggar

6:27 pm on Mar 15, 2007 (gmt 0)

10+ Year Member



Cool, I'll try to incorperate this with the next random sub-community.

Thank you.

I knew remember from the old DOS days would come in handy someday!