...But a scripting engine can process A LOT of information (think about how
much information can be sent with a HTML form in posted variables). Apache
and IIS do not call PHP.EXE sending all posted variables inside command line
arguments... So, how do THEY do it???
Thanks a lot for the patience...
Cheers Diego.
Michael Geier WROTE:
you can pass the $ARGV array as command line parameters
/script.php arg1 arg2
script.php
#!/path/to/php -q
<?
if (count($argv) < 2) {
die ('Please enter correct number of parameters');
}
echo $argv[1] . " | " . $argv[2] . "\n";
?>
JOE STUMP WROTE:
Yeah - like I said ....
php foo.php -url http://www.mydomain.com/myfile.php
in foo.php
echo $argc; // should be 3
echo $argv[0]; // will be the filename
echo $argv[1]; // will be -url
echo $argv[2]; // will be the url
--Joe
-----Original Message-----
From: Diego Fulgueira [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 15, 2001 4:45 PM
To: Php-General
Subject: [PHP] Passing variables to a scripting engine... (like php)
Ok. I already posted a question asking how to pass parameters to php.exe
when running it directly from the command prompt. However, i've noticed the
matter is a bit more complex than i had thought. I will reformulate my
question:
How the h--- does any Web Server passes information like the URL being
processed, posted variables, etc, etc, to a scripting engine???
I've noticed it is not through command line arguments... Could it be using
enviroment variables...?
The initial purpose of this was to schedule a script to be executed on a
periodic basis... but know I am very curious!!
Still, i will greatly appreciate workarounds.
THANKS A LOT AGAIN.
Cheers, Diego.
--
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]
--
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]