note 23230 added to ref.exec

From: Date: Fri, 12 Jul 2002 08:33:20 +0000
Subject: note 23230 added to ref.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-32949@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. -- http://www.php.net/manual/en/ref.exec.php http://master.php.net/manage/user-notes.php?action=edit+23230 http://master.php.net/manage/user-notes.php?action=delete+23230 http://master.php.net/manage/user-notes.php?action=reject+23230

« previous php.notes (#32949) next »