Reply to Re: noob question about document_root

Your name:

Reply:


Posted by klenwell on 10/10/07 15:52

On Oct 10, 7:30 am, Francesco <f...@tluk.it> wrote:
> BoneIdol wrote:
> > My advice would be to do a print_r on $_SERVER. See what it comes up
> > with.
>
> Hmmm you are right...
> there is no DOCUMENT_ROOT defined in $_server array...
>
>
>
> > If this is the case, try using $HTTP_SERVER_VARS instead.
>
> ...but it's the same for this one.
>
> > You may find that the superglobal is empty or unset if you are using
> > a very old version of PHP.
>
> I'm using php 5.2.0.
>
> As I said before, I actually can find the DOCUMENT_ROOT properly set in
> phpinfo() output
>
> * "Apache Environment" section, as
> DOCUMENT_ROOT | c:/.../properPath
>
> * and "PHP variables" section, as
> _SERVER["DOCUMENT_ROOT"] | c:/.../properPath
>
> Any ideas??
>
> Thanks
> Francesco

Are you running your script for the command line? From
http://us.php.net/reserved.variables:

"You may or may not find any of the following elements in $_SERVER.
Note that few, if any, of these will be available (or indeed have any
meaning) if running PHP on the command line."

[Back to original 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

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