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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
avaurus
Forum Newbie
Posts: 1
Joined: Mon Aug 12, 2002 6:08 am
Contact:

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

Post 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.
User avatar
enygma
Site Admin
Posts: 175
Joined: Fri Apr 19, 2002 8:29 am
Location: Dallas, Tx

Post 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....
Post Reply