时间:2021-07-01 10:21:17 帮助过:19人阅读
#查看当前php版本123456deMacBook-Pro:~ admin$ php -vPHP 5.5.14 (cli) (built: Sep 9 2014 19:09:25)Copyright (c) 1997-2014 The PHP GroupZend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies#去php.com下载对应的php包#下载下来后,切换目录,按照下面的步骤进行操作sh-3.2# tar -zxvf php-5.5.14.tar.gzsh-3.2# cd php-5.5.14/ext/pcntl/sh-3.2# mac下可能会失败,分开操作,每个命令下面加sudo即可sh-3.2# sudo phpizesh-3.2# sudo ./configuresh-3.2# sudo make testsh-3.2# sudo make installsh-3.2# #也可以直接操作 phpize && ./configure && make install sh-3.2# echo "extension=pcntl.so" >> /etc/php.inish-3.2# apachectl restartchecking if everything is ok.sh-3.2# php -m | grep pcntlpcntl