Not sure what you are doing below, if you set up apache so that files with a
certain extension execute through the cgi and not the module, then you can
pass them through a form with GET/POST.
If you are running it from the command line, then...
I don't know.
All arguments should be passed as argv or argc, so you could write a test
script that spits out argv and argc and see what the script saw. Then you
have to manually parse out command line options in your script.
How to process data
remove all '-'
Split on whitespace to get key=value entities
Split on '=' into key/value pairs
That's how I would attack it at first, and then go from there.
On 4/8/01 2:13 PM, "NoSpeed" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I want to write a small application that will change something in databases
> on various locations.
>
> I can do this in Perl, but being used to the grace and simpleness of doing
> DB's with PHP, DB's with Perl became a real super drag :((((
>
> So what i would like to know is the following.
>
> I know you can make a php executable and let it function as a script.
> (by adding the correct shebang)
>
> But how can i make commandline parameters visible in the php script ?
>
> lets say we have this :
>
> $
> /usr/bin/changeinfo.php -database=test -table=testtable -row=changethis -dat
> a=replaceforthis.
>
> How can i get these parameters in the script so i can work with them ?
>
> Thanks
>
> --
> - NoSpeed
> ------------------------------------------------------
> - Carpe Noctem
>
> "The stickers on the side of the box said "Supported Platforms: Windows 98,
> Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported
> platform."
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]