mac电脑安装php7

 

 

1.安装 homebrewphp

https://www.jianshu.com/p/abea83253671git

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/homebrew-php

 

2.Homebrew安装PHP(new!)github

https://www.jianshu.com/p/4189c878da21ruby

brew install php@7.1

 最后根据上述安装后的结果执行bash

echo 'export PATH="/usr/local/opt/php@7.1/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/php@7.1/sbin:$PATH"' >> ~/.bash_profile
export LDFLAGS="-L/usr/local/opt/php@7.1/lib"
  export CPPFLAGS="-I/usr/local/opt/php@7.1/include"
source ~/.bash_profile
相关文章
相关标签/搜索