美文网首页
Mac安装PHP7

Mac安装PHP7

作者: 欧巴刚弄死他 | 来源:发表于2017-03-16 14:25 被阅读0次

首先我们需要安装Homebrew。注意它会让你通过回车键确认,并验证你的密码。

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

通过brew来安装:

 $ brew install homebrew/php/php56-redis

重启Apache

sudo apachectl restart

到你的Apache的默认目录/Library/WebServer/Documents下面去增加一个info.php的文件。

<?php    
 phpinfo();    
 ?>

你的php7.0目录会在"/usr/local/opt/php70/bin"
这个地址可以用来粘贴在PhpStorm的CLI Interpreter中(Preference->Language&Frameworks->PHP->CLI Interpreter->...->PHP executable)。

相关文章

网友评论

      本文标题:Mac安装PHP7

      本文链接:https://www.haomeiwen.com/subject/iaqjnttx.html