简体   繁体   English

使用MAMP的php而不是Mac OSX的php

[英]Using MAMP's php instead of Mac OSX's php

I added the path to MAMP's php and restarted terminal, but which php still points to the php that comes with Mac OSX. 我将路径添加到MAMP的php并重新启动了终端,但which php仍指向Mac OSX随附的php。

Question: How can I switch to MAMP's php v5.4.10? 问题:如何切换到MAMP的php v5.4.10?

Added to .bash_profile & .bashrc 添加到.bash_profile.bashrc

export PATH=/Applications/MAMP/bin/php/php5.4.10/bin/php:$PATH

which php after restarting Terminal 重新启动终端后which php

/usr/bin/php

Add only the path to your PATH, not the executable itself. 仅将路径添加到PATH,而不添加可执行文件本身。 Meaning only up to the ../bin directory. 仅表示../bin目录中的内容。 The PATH is a list of directories in which executables are being looked for. PATH是在其中查找可执行文件的目录的列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM