Re: Getting The Document Root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, February 2, 2006 7:14 am, Jeremy Privett wrote:
> I'm looking for a method that would be able to extract the user's true
> document root (e.g. /home/jeremy/public_html/) so that I can use it
> for
> some filesystem scanning functions. I'm trying to avoid hard-coding
> supported document roots in favor of being able to dynamically detect
> it, but nothing is coming to mind. I thought I would consult some of
> the
> minds of the mailing list for advice. Any ideas or code would be
> greatly
> appreciated.

What you want is in the output from:
<?php phpinfo();?>

Just search for the directory on your site that you know is correct,
and figure out which variables you need to get that.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux