shell_exec php example

m3g4tech

New Member
Hi there are multiple specific examples but I just wanted to have a working generic calling PHP into background example from shell_exec.So my php function runs a large processing job.On the top of the script (process.php) I put?\[code\]!#usr/bin/php\[/code\]i think - any way to get that specific path, maybe 'which php'?then the actual command is \[code\]shell_exec(sprintf('php process.php %s %s > /dev/null 2>/dev/null &','data1','data2'));\[/code\]and access the data from process.php with \[code\]argsv[1]\[/code\] and \[code\]argsv[2]\[/code\]?thanks
 
Back
Top