|
Posted by Jerry Stuckle on 12/08/07 02:36
AnrDaemon wrote:
> 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).
>
No, I didn't. CGI is NOT the same as CLI. CGI is started from a web
server. CLI is started from a command line. The processing and options
are not the same - which is partly why they have different names!
> 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.
>
>
Ah, but there are differences. And much more than your little --help
commands show. All they have is the command line options.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|