I am trying to use a proc_open() in my php script to call and execute another php script. The following is the code:
$descriptors = array(
0 => array("pipe","r"),
1 => array("pipe","w"),
2 => array("file","./error_log.txt","a")
) ;
$cwd="./";
$process=proc_open('php reversegame.php &', $descriptors,$pipes,$cwd);
if (is_resource($process)) {
$return_value = proc_close($process);
}
This writes the following error in the error_log.txt
PHP: syntax error, unexpected '&' in /etc/php5/cli/php.ini on line 107
I am new to proc_open, and still trying to get a grasp on the usage of this function. I am actually trying to execute this php script simultaneously while running another script!