I didn't thought about this, but it's logic (as always). However I solved my problem: I've developed a really simple program with C++Builder6 (only ~15 lines of code :-P) that every X seconds calls the php file (agent.php). And finally it works!!!!!
Thanks for your help, Evan <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Simple. Parameters of the type you described, with the ?, = and &, etc. are specific to URLs and are handled by CGI, common gateway interface, i.e. the web server. See the PHP documentation on $argc[] and $argv[] if you want to pass parameters on the command line. http://us2.php.net/manual/en/features.commandline.php Your question mark directly after the file name is confusing DOS. Parameters on the DOS command line need to be separated from the file name by a space. Essentially, $argc is your argument count and $argv is an array of the values of the arguments. You won't be able to use $_GET when working with variables from the command line. It wouldn't be wise to design one script that works from either the command line or the web browser, plus it would be a major pain in the ass. Luck, Colin Teubner -----Original Message----- From: Evan [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 1:07 PM To: [EMAIL PROTECTED] Subject: [PHP] php.exe from command line I've made a simple php file that creates a file named 'agent_1.txt' where the number is taken from $_GET["num"]. I've tried to run it in this way: http://localhost/agent.php?num=1 And it works perfectly I thought that from from command line it would work so i tried this (WinXP + PHP 4.1.2): c:\php\php.exe c:\Inetpub\webpub\PHP\agent.php?num=1 BUT IT DOESN'T WORK!!!!! ? Can someone help, please? Thenks in advance, Evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php