|
Posted by AnrDaemon on 12/08/07 02:20
Greetings, Jerry Stuckle.
In reply to Your message dated Wednesday, December 5, 2007, 23:24:58,
>> In reply to Your message dated Wednesday, December 5, 2007, 14:56:22,
>>
>>> As he said - if it is from the command line, $argc and $argv will exist,
>>> as will $_SERVER['argc'] and $_SERVER['argv'].
>>
>> Not if it is started using PHP-CGI and argc/argv vars disabled in
>> configuration.
> If it's using php-cgi, then it's not started from the command line, is it?
You forgot that PHP-CGI *IS* a commandline executable intended to deal with
pipelined I/O from/to server.
And You still can use it instead of CLI (either knowing that or by accident).
JFYI:
<stdout>:php-cgi.exe --help
Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
php <file> [args...]
[snip]
<stdout>:php.exe --help
Usage: php [options] [-f] <file> [--] [args...]
php [options] -r <code> [--] [args...]
php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
php [options] -- [args...]
php [options] -a
[snip]
Not a big difference, You see. Basically no difference in general,
same [-f <filename>] syntax for both versions of interpreter.
--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>
[Back to original message]
|