I've wondered for quite some time, and search just as long it seems like, for a way to get the current URL directory. For example, let's say you were at www.example.com/files. The script is executing in this directory, and it's calling an include script from the base (www.example.com or maybe even www.example.com/includes). In this included file are some links and maybe some images. These images and links are set up to be called from the base directory, so basically all the links inside the file say something like "images/bob.gif" or something of that nature. How could you dynamicaly change this in relation to where the included script is? If I were to include it in that files in /files, it would look for the images in /files/images/bob.gif which would not be there. One solution I have thought of is just putting the / at the beginning (/images/) but that wouldn't be the safest solution if the script were running in a subfolder to begind with (like the entire site is in www.example.com/site1). I hope you understand what I'm trying to say. Any ideas? Thanks, Stephen Craton http://www.melchior.us <http://www.melchior.us/>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php