查看环境变量,PHP运行的文件位置:
which php
终端输入,可能,bash_profile 文件并不存在,就创建新文件
vi ~/.bash_profile
然后把环境变量代码添加到bash_profile脚本里
export PATH="/Applications/MAMP/bin/php/php7.2.22/bin:$PATH"
执行文件,使起生效
source ~/.bash_profile
查看环境变量,PHP运行的文件位置:
which php
终端输入,可能,bash_profile 文件并不存在,就创建新文件
vi ~/.bash_profile
然后把环境变量代码添加到bash_profile脚本里
export PATH="/Applications/MAMP/bin/php/php7.2.22/bin:$PATH"
执行文件,使起生效
source ~/.bash_profile
评论 (0)