这是我的代码,里面index.php
(只是一个例子):如何与Apache使用pcntl_fork()?
$pid = pcntl_fork();
if ($pid == -1) {
die("failed to fork");
} else if ($pid) {
// nothing to do
} else {
putDataIntoWebService();
exit();
}
echo "normal page content";
这段代码工作在命令行罚款。在Apache中exit()
杀他们两个,家长和孩子的过程。什么是解决方法?
请参阅http://stackoverflow.com/a/13105346/632951 – Pacerier