Posts mac os 替换自带php版本
Post
Cancel

mac os 替换自带php版本

通过brew 安装的php版本后执行命令

1
brew info php@7.2

执行后会提示需要执行的命令

If you need to have this software first in your PATH instead consider running:

1
2
  echo 'export PATH="/usr/local/opt/php@7.2/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/php@7.2/sbin:$PATH"' >> ~/.zshrc

执行 echo 命令就行了

最后source

1
source ~/.zshrc //立即生效
This post is licensed under CC BY 4.0 by the author.