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
相關文章
相關標籤/搜索