0
我在第一次尝试在fork中使用fork。 当我使用在ubuntu上安装php fork
$pid = pcntl_fork();
if ($pid == -1) {
die('could not fork');
} else if ($pid) {
// we are the parent
pcntl_wait($status); //Protect against Zombie children
} else {
// we are the child
}
(在php.net中的fork示例)我将收到以下错误。
Server error The website encountered an error while retrieving http://localhost/fork.php . It may be down for maintenance or configured incorrectly.我认为fork没有启用,所以我don载php5的源代码,并做
./configure --enable-pcntl make make install但我也会得到同样的错误。 哪里有问题?
这不是启用。我做到了,但我找不到任何pcntl单词的结果。 –