Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我添加了 MAMP 的路径php并重新启动了终端,但which php仍然指向 Mac OSX 附带的 php。
php
which php
问题:如何切换到 MAMP 的 php v5.4.10?
添加到.bash_profile&.bashrc
.bash_profile
.bashrc
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin/php:$PATH
which php重启终端后
/usr/bin/php
仅添加PATH 的路径,而不是可执行文件本身。意思只到../bin目录。PATH 是在其中查找可执行文件的目录列表。
../bin