A question on how to get the root directory
| From: | C Benn | Date: | Sun, 13 May 2001 00:43:17 +0000 |
| Subject: | A question on how to get the root directory | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-52600@lists.php.net to get a copy of this message | ||
I am new to PHP having converted from ASP (don't beat me up, it just took me
a while to see the light)
MY QUESTION: What in PHP acts like the 'server.mappath' function in ASP? It
gives you the ability to determain the root of the web site and use it as a
reference.
MY PROBLEM: I have been able to use '/some/folder/whatever.gif' to point to
the image folder with GIFs inside no matter where I am in the site in the
HTML part of my pages. It doesn't seem to work includes in the <?PHP ?>
tags. I either have to use
'http://www.mysite.com/some/folder/whatever.inc'
-OR- '../../whatever.inc'.
Any ideas?
INFO: I am running Apache with PHP4.03 installed as a module
Thanx in advance!!