You are here: Re: [PHP] Document root, preferred way to find it??? « PHP « IT news, forums, messages
Re: [PHP] Document root, preferred way to find it???

Posted by Tom Rogers on 03/03/05 02:26

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация