Re: [PHPLIB] Arguments to PHP script. From: Sam C. Nicholson !! (scion <email protected>)
Date: 01/21/00

It's buried in the docs somewhere, but not obvious.

You need the shebang:

#! /usr/local/bin/php -q

and then use the $argc integer, and the $argv[] array.
$argv[0] is the command, natch.

I use this for testing my web pages as well.
And remember, many error messages from php have html around them.

-sam

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.