查看环境变量,PHP运行的文件位置:which php
1. 终端输入,可能,bash_profile 文件并不存在,就创建新文件
sudo vi ~/.bash_profile
2.然后把环境变量代码添加到bash_profile脚本里
export PATH="/Applications/MAMP/bin/php/php7.2.10/bin:$PATH"
3.执行文件,使起生效
source ~/.bash_profile
查看环境变量,PHP运行的文件位置:which php
1. 终端输入,可能,bash_profile 文件并不存在,就创建新文件
sudo vi ~/.bash_profile
2.然后把环境变量代码添加到bash_profile脚本里
export PATH="/Applications/MAMP/bin/php/php7.2.10/bin:$PATH"
3.执行文件,使起生效
source ~/.bash_profile
本文标题:Mac 切换默认PHP版本为mamp版本
本文链接:https://www.haomeiwen.com/subject/tszbnhtx.html
网友评论