You are here: Re: setting $_SERVER variables from a shell script « PHP Programming Language « IT news, forums, messages
Re: setting $_SERVER variables from a shell script

Posted by Good Man on 07/19/07 21:26

"laredotornado@zipmail.com" <laredotornado@zipmail.com> wrote in
news:1184879558.450325.300690@o61g2000hsh.googlegroups.com:

> Hi,
>
> Using php 4.4.4 on Fedora Core 5 Linux. I'm running a PHP program via
> a command line script rather than accessing the page through my web
> server. I was wondering if it's possible to set the
> $_SERVER['DOCUMENT_ROOT'] variable from my shell script so that when I
> run my PHP file
>
> #!/bin/bash
> /usr/local/bin/php4.cli myfile.php
>
> the variable will be recognized as opposed to returning nothing.
>
> Thanks for any advice, - Dave

I don't quite follow... $_SERVER['DOCUMENT_ROOT'] is only there for you to
retreive a value; you can't set it. Well you can, but only via php.ini
What are you trying to do with that value?

 

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

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