|
Posted by Andy Jeffries on 05/15/06 09:55
On Thu, 11 May 2006 12:36:19 -0700, Chung Leong wrote:
>> Or PHP configured as a CLI binary (AFAIK $_SERVER is only available to
>> apache modules and ISAPI modules).
>
> I'm pretty sure that $_SERVER, along with $_GET, $_POST, and $_COOKIE are
> available in PHP-CLI. They're built fairly deep inside PHP. There's no
> easy way to rip them out. It's certainly not worth the effort, as you'll
> only end up breaking things.
Sorry, you're right, $_SERVER is available, what I meant was that I didn't
think $_SERVER[PHP_SELF] was available to CLI. Having actually tested it,
I'm pleased to say I'm wrong and it is indeed available to CLI PHP.
> Only session and file support support are removed from CLI if I remember
> correctly.
Actually it creates session files in the current folder if you start a
session from a CLI script (made that mistake with an import script) and it
certainly does contain file support (same import script reads local files).
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|