note 23230 deleted from ref.exec by dams

From: Date: Sat, 27 Jul 2002 16:49:43 +0000
Subject: note 23230 deleted from ref.exec by dams
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-33700@lists.php.net to get a copy of this message
I was trying to run a php script in background in Windows XP. It was not so easy as in Linux... Here is the solution: You have to make a windows link to your php.exe file and then run: exec ('PATH_TO_LINK/php.lnk -q PATH_TO_SCRIPT/test.php >NUL'); Note, that you cannot execute script like this: test.php?var1=value1&var2=value2. I found a solution (an ugly one) for this too. Instead of exec ('PATH_TO_LINK/php.lnk -q PATH_TO_SCRIPT/test.php?var1=value1&var2=value2 >NUL'); write: exec ('PATH_TO_LINK/php.lnk -q PATH_TO_SCRIPT/test.php =var1=value1 var2=value2 >NUL'); Then, the array $HTTP_GET_VARS inside the script would look like this: Array ( [PATH_TO_SCRIPT/test_php_] => var1=value1 var2=value2 ) Odd, but you can make it work... If anyone knows a better solution, please let me know.

« previous php.notes (#33700) next »