Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Newbie Questions (http://www.greenguysboard.com/board/forumdisplay.php?f=5)
-   -   Calling For An Image (http://www.greenguysboard.com/board/showthread.php?t=35152)

Licker4U 2006-10-10 07:09 AM

Calling For An Image
 
Isn't there some way to call for an image one level up or something by using . . and /'s ?

dareutwo 2006-10-10 07:17 AM

../

ladydesigner 2006-10-10 07:18 AM

Try using ../

ladydesigner 2006-10-10 07:20 AM

Ooops! I guess Dareutwo beat me to it. |loony|

Licker4U 2006-10-10 07:37 AM

OK, instead of putting in the entire path, just put ../ and the file name?

dareutwo 2006-10-10 07:44 AM


Licker4U 2006-10-10 09:05 AM

Kewl, thanks!

Licker4U 2006-10-10 12:03 PM

Will that work for calling from a folder? If so, how would I do it? Or does that require SSI?

Preacher 2006-10-10 12:22 PM



These are relative paths and have nothing to do with ssi.

Licker4U 2006-10-10 02:03 PM

Damn that's too cool!

virgohippy 2006-10-10 02:06 PM

You can even go so far as "../../../moving/forward/to/image.jpg" but that can get pretty confusing.

Though not as confusing as managing and troubleshooting SSI and htaccess. |loony|

Licker4U 2006-10-10 03:09 PM

LOL I've got SSI down pretty well, wasn't as difficult as I thought. If this: ../images/boobs.jpg displays the boobs.jpg image in a folder named images, what does ../../ do?

virgohippy 2006-10-10 03:17 PM

"../../images/boobs.jpg" goes back two levels before it grabs the boobs. ;)

Personally, I only like to go back one level before I grab some boobs. I might be tall and skinny, but my arms are only so long. |loony|

juggernaut 2006-10-10 05:18 PM

If your not sure ask your host what your sites are running on. Some time back there was a hack on a MS box (roughly 1 year ago) for paths. Believe it or not some hosts forget to run an IIS lockdown tool.

http://searchsecurity.techtarget.com...134252,00.html

Licker4U 2006-10-17 09:15 AM

What would cause the ../ to not work? I used it to get some images for recip tables and it worked just fine. I copied and pasted the EXACT path and on a few recip tables it doesn't work. |huh

dareutwo 2006-10-17 09:29 AM

Are the images in fact on the server in the folder 1 level up?
check your htaccess

Fonz 2006-10-17 09:50 AM

Could you show us the page where you're calling the image and the location where the image is?

juggernaut 2006-10-17 12:35 PM

Quote:

Originally Posted by Licker4U (Post 306748)
What would cause the ../ to not work? I used it to get some images for recip tables and it worked just fine. I copied and pasted the EXACT path and on a few recip tables it doesn't work. |huh

Call your host and make sure they dont have relative paths shut off. This is in option with most webservers. Not an option when you purchase the service, rahter and option that can be shut off after you in stall Apahce or IIS. Most leave it on. dareutwo is correct also, could be your htacess. Put in the full path on the page, save it then check if the images come up. If so, if I had to guess it's something in the code, like most things with code when it wont work it's something simple. You may just be missing ' or something.

Licker4U 2006-10-17 01:18 PM

Well crap. Everything is working now. I guess it had something to do with old shit still stored in a cache somewhere. As I said in another post I cleared out History, deleted cookies and offline content, but still was seeing old stuff. I even re-booted my PC. I guess overnight everything reset.

juggernaut 2006-10-17 01:31 PM

Sometimes doing the things you have don't wont work. I have found that out myself. But for some reason if you press f5, it's not really a refresh of the page. f5 will call the server and request and new changes to the page since your last visit. There were times I refreshed till my finger hurt, then I pressed f5 and everything I changed showed up.

Licker4U 2006-10-17 02:02 PM

I'll try that

DJilla 2006-10-19 08:59 AM

Don't forget that using ../../image.jpg as your file basis can work fine for the page you are using. However, if you take that page later and copy it into a new folder then the relative paths back to the root may no longer be correct and fail to work properly. This is why using the absoute path is often the preferred choice.


All times are GMT -4. The time now is 07:27 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc