美文网首页
macOS 切换php版本

macOS 切换php版本

作者: 服务器宕机了 | 来源:发表于2016-11-20 19:28 被阅读0次

    macOS有自带的php,但是安装了集成开发环境之怎样才能切换到集成开发环境的php版本呢?

    1.打开终端输入:

       sudo nano ~/.bash_profile

    2.粘贴一下内容到脚本的最后面:

    # Setting PATH for MAMP

    PATH="/Applications/MAMP/bin/php/你的php版本/bin:$PATH"

    export PATH

    如图:

    截图

    3.然后先按control+o 保存,在按control+x退出。

    4.执行:

    source .bash_profile

    5.which php命令,就已经变成MAMP目录下的PHP版本了

    相关文章

      网友评论

          本文标题:macOS 切换php版本

          本文链接:https://www.haomeiwen.com/subject/vesypttx.html