The Little Guy Posted January 24, 2012 Share Posted January 24, 2012 Using Windows, how do you redirect the output, something similar to /dev/null? I tried this: shell_exec("php ./myScript.php arg1 arg2 arg3 >/dev/null"); but I am getting this error: The system cannot find the path specified. So, how do I redirect the output in Windows? Link to comment https://forums.phpfreaks.com/topic/255648-redirect-output/ Share on other sites More sharing options...
The Little Guy Posted January 24, 2012 Author Share Posted January 24, 2012 Okay, so I figured out it is this: shell_exec("php ./pingDomain.php $domain $domain_id $date > NUL"); Now any ideas how to make it so it doesn't wait for the script to finish executing before it continues? Link to comment https://forums.phpfreaks.com/topic/255648-redirect-output/#findComment-1310521 Share on other sites More sharing options...
The Little Guy Posted January 24, 2012 Author Share Posted January 24, 2012 Fix: $WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("cmd /K php ./pingDomain.php $domain $domain_id $date", 0, false); Link to comment https://forums.phpfreaks.com/topic/255648-redirect-output/#findComment-1310525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.