星期一, 7月 25, 2016

[MAMP] Mac的php版本改用MAMP的php版本的方法

直接用MAMP來取代mac原本裝裝php5版本,

請參考下面流程,請注意MAMP_PHP改為你要使用的版本號即可

open terminal, type
touch ~/.bash_profile; open ~/.bash_profile
edit as follows below, save, quite and restart terminal or alternately
source ~/.bash_profile
to execute new PATH without restarting terminal
and in the fashion of the DavidYell's post above, also add the following. You can stack various variables by exporting them followed by a single PATH export which I demonstrated below
export MAMP_PHP=/Applications/MAMP/bin/php/php5.6.10/bin
export MAMP_BINS=/Applications/MAMP/Library/bin
export USERBINS=~/bins
export PATH="$USERBINS:$MAMP_PHP:$MAMP_BINS:$PATH"
http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path

沒有留言:

張貼留言

留個話吧:)