note 76119 added to function.system
| From: | aaronatvisual-codedotcom at osu1 dot php dot net | Date: | Sun, 01 Jul 2007 11:41:34 +0000 |
| Subject: | note 76119 added to function.system | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128130@lists.php.net to get a copy of this message | ||
Regarding the running of processes in the background. i found that after a few different attempts
that this worked fine and allowed the main script to continue unhindered.
Hope that this might help someone.
$arg1 = "arg1";
$arg2 = "arg2";
$page = "/path/tothe/script/scriptToRun.php";
$args = "--arg1='".urlencode($arg2)."' --arg2
='".urlencode($arg2)."'";
$command = "(php -c /usr/local/lib/php.ini ".$page." ".$args." &) >
/dev/null";
system($command);
----
Server IP: 83.137.20.120
Probable Submitter: 85.144.135.57
----
Manual Page -- http://www.php.net/manual/en/function.system.php
Edit -- https://master.php.net/note/edit/76119
Del: integrated -- https://master.php.net/note/delete/76119/integrated
Del: useless -- https://master.php.net/note/delete/76119/useless
Del: bad code -- https://master.php.net/note/delete/76119/bad+code
Del: spam -- https://master.php.net/note/delete/76119/spam
Del: non-english -- https://master.php.net/note/delete/76119/non-english
Del: in docs -- https://master.php.net/note/delete/76119/in+docs
Del: other reasons-- https://master.php.net/note/delete/76119
Reject -- https://master.php.net/note/reject/76119
Search -- https://master.php.net/manage/user-notes.php