Re: Document root, preferred way to find it???
| From: | Tom Rogers | Date: | Thu, 03 Mar 2005 00:26:23 +0000 |
| Subject: | Re: Document root, preferred way to find it??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-209878@lists.php.net to get a copy of this message | ||
Hi,
Thursday, March 3, 2005, 5:21:58 AM, you wrote:
A> I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path
A> for includes, etc.
A> We just moved the site to a new virtual host and it doesn't work. print_r()
A> gives me:
>> $_SERVER['document_root']= /usr/local/apache/htdocs
>> $_SERVER['path_translated']= /home/user/public_html/
A> What do you guys use for you docroot?
If path_translated exists use that as it indicates a virtual website,
otherwise use document_root
--
regards,
Tom