0

My index.php resides on WAMP, and when a start URL is invoked I wish to kick off another PHP process.php script that will run asynchronously. So when this process.php script is invoked my index.php will return and will not be blocked.

Then in the future, when a stop URL is invoked I wish to terminate the process I started.

My index.php contains the following:

$script = "process.php";
$handle = popen ("php $script", "r");
echo $handle;

Both scripts reside in the same directory

The handle then simply prints Resource id #2 but my process.php does not seem to have been invoked.

What am I doing wrong here?

DJ180
  • 18,724
  • 21
  • 66
  • 117
  • What exactly am I reading? This script downloads Flash media and outputs to an external file – DJ180 Oct 06 '13 at 16:55
  • If you just want to run the script in the background, take a look here: http://stackoverflow.com/questions/45953/php-execute-a-background-process – nice ass Oct 06 '13 at 16:59

0 Answers0