You are here: Re: noob question about document_root « PHP Programming Language « IT news, forums, messages
Re: noob question about document_root

Posted by BoneIdol on 10/10/07 12:04

On 10 Oct, 12:27, Francesco <f...@tluk.it> wrote:
> Hy guys,
> I'm new to php and I'm wondering why i get the notice
> Undefined index: DOCUMENT_ROOT
>
> if I write
> define('ROOT_PATH',$_SERVER['DOCUMENT_ROOT'] .'/mypath')
>
> But if I see the phpinfo() output the DOCUMENT_ROOT is properly set.
>
> Thanks for any advice
> Francesco

My advice would be to do a print_r on $_SERVER. See what it comes up
with.
You may find that the superglobal is empty or unset if you are using
a very old version of PHP.

If this is the case, try using $HTTP_SERVER_VARS instead.

 

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

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