From c34d7c1d9aa2207ec0c0a7773b7d9701b34e4420 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Thu, 16 May 2002 20:52:38 +0000 Subject: [PATCH] Correcting CGI/CLI problems in script and windows examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@82465 c90b9560-bf6c-de11-be94-00142212c4b1 --- features/commandline.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/features/commandline.xml b/features/commandline.xml index 61150bde98..e565e2a5f4 100644 --- a/features/commandline.xml +++ b/features/commandline.xml @@ -1,5 +1,5 @@ - + Using PHP from the command line @@ -822,7 +822,7 @@ Usage: php [-q] [-h] [-s [-v] [-i] [-f ] | { [args...]} Script intended to be run from command line (script.php) In the script above, we used the special first line to indicate, - that this file should be run by PHP and should not print out HTTP - headers. There are two variables you can use while writing command - line applications with PHP: $argc and - $argv. The first is the number of arguments plus - one (the name of the script running). The second is an array - containing the arguments, starting with the script name as number - zero ($argv[0]). + that this file should be run by PHP. We work with a CLI version + here, so there will be no HTTP header printouts. There are two + variables you can use while writing command line applications with + PHP: $argc and $argv. The + first is the number of arguments plus one (the name of the script + running). The second is an array containing the arguments, starting + with the script name as number zero ($argv[0]). In the program above we checked if there are less or more than one @@ -872,7 +872,7 @@ This is a command line PHP script with one option. Batch file to run a command line PHP script (script.bat) -@c:\php\php.exe -q script.php %1 %2 %3 %4 +@c:\php\php.exe script.php %1 %2 %3 %4