Page 1 of 1

php.exe test.php?variable=value doesn´t work !

Posted: Mon Aug 12, 2002 6:08 am
by avaurus
Hi

I´m new here and I want you to ask a strange question, because I am programming a webserver for Windows for free, and this webserver might have the abilities to run php.exe with variables, but the the php-interpreter doesn´t accept variables this way:

Code: Select all

php.exe test.php?variable=value
some people said to me that I have to try this:

Code: Select all

php.exe test.php variable=value
but even this doesn´t work.With Perl.exe this works, but the php.exe doesn´t want to accept this.

I would be very happy if somebody can help me.
avaurus.

Posted: Mon Aug 12, 2002 8:37 am
by enygma
you have to use the argv variable....

like this:
---------------------------------
<?php
print_r($argv);
?>

./file.php test one
----------------------------------
Will echo:

Array(
[0]=>test
[1]=>one
);

or something similar....