美文网首页
mac上修改php命令行的路径

mac上修改php命令行的路径

作者: misaka去年夏天 | 来源:发表于2017-07-13 16:32 被阅读0次
    sudo vim ~/.bash_profile
    #添加代码如下
    #PATH填写想替换的php二进制文件路径
    
    PATH="/Applications/MAMP/bin/php/php7.0.8/bin:$PATH"
    export PATH
    
    source ~/.bash_profile      #刷新
    php -v                                #可以看到php版本已修改
    which php                          #可以看到php命令的二进制执行路径
    

    相关文章

      网友评论

          本文标题:mac上修改php命令行的路径

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