-
第一步:
执行命令:(curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3)
(这个会有点慢) -
第二步:
编辑~/.bash_profile文件新增下载安装的php路径
export PATH=/usr/local/php5/bin:$PATH
我的路径是
-
第三步:
重新加载配置文件
source ~/.bash_profile
如果要降低php的版本也可以这样使用相同的操作,在bash_profile指定你需要的版本路径即可