Previously, Jordan Elver said:
>
> I'm not using virtual hosts on my local machine but I am on the production
> machine. What should DOCUMENT_ROOT return? I though it returns the directory
> of the current script. So if I had a site in
> /usr/local/apache/htdocs/cha/script.php then I would expect DOCUMENT_ROOT to
> return /usr/local/apache/htdocs/cha/, is that right?
No, if you want to fetch that then do this:
$my_directory = dirname($PHP_SELF);
If you don't have register_globals on then you might have to do this
instead:
$my_directory= dirname($HTTP_SERVER_VARS['PHP_SELF']);
Should end up with "/usr/local/apache/htdocs/cha" in $my_directory (in this
particular case).
$DOCUMENT_ROOT is whatever your httpd.conf file says DocumentRoot is.
Even if you don't use virtualhosts, there should be a DocumentRoot in one
of your Apache config files. I believe Apache will complain loudly on
startup if that parameter is missing.
-dan
--
Plan to be spontaneous - tomorrow.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]