Re: detaching and running php processes in the background
| From: | Burhan Khalid | Date: | Fri, 21 Nov 2003 11:25:23 +0000 |
| Subject: | Re: detaching and running php processes in the background | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170544@lists.php.net to get a copy of this message | ||
Gary C. New wrote:
What is the best way to detach and run a command line based php script in the background from a web-based php script, without the need for reporting?Try something like : if (!($handle = popen("script.sh 2>&1 > /dev/null &", "r"))) { echo "Couldn't run process"; } http://www.php.net/popen -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com ----------------------- "Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing."