Is it possible to pass arguements when using PHP before 4.3.n?[SOLVED]

From: Date: Thu, 13 May 2004 15:18:36 +0000
Subject: Is it possible to pass arguements when using PHP before 4.3.n?[SOLVED]
Groups: php.general 
Request: Send a blank email to php-general+get-186105@lists.php.net to get a copy of this message
Is it possible to pass arguements when using PHP before 4.3.n when doing command line stuff? I have built a small script that opens a file, reads from it, and returns some results. Instead of changing the fopen line each time I would just like to pass the name of the file to be tested. I tried as a URL /usr/local/bin/php mySmallScript.php?n=foo.php Didn't work. Wait... Heck. Works fine if you do not mind the headers. $argv and $argc are the answers. /usr/local/bin/php mySmallScript.php foo.php foo.php will be in $argv[1]

« previous php.general (#186105) next »