change the PHP path to MAMPs PHP

后端 未结 6 846
野的像风
野的像风 2020-12-05 08:38

I\'m running PHP with MAMP on OSX 10.5.8

So if I want to run a script from console I always need to write

/applications/mamp/bin/php5.3/bin/php path/         


        
6条回答
  •  遥遥无期
    2020-12-05 09:26

    Create a file called .bash_profile on your home directory (if you don't have this file already), and add this to the file:

    export PATH=/Applications/mamp/bin/php5.3/bin:$PATH
    

    Then quit and relaunch Terminal.app

提交回复
热议问题