Mac 系统预装随带了 PHP7 以及 Apache2 ,经过一番配置
用 brew 安装好 MariaDB 后,经过一番配置后,用 mysql_connet 连接数据库发现报这个函数错。 搜索一下才知道原来是 PHP7 已经不支持这个函数了。 好吧。 为了兼容性的需求,为了和原来 CentOS 系统的习惯兼容,只能安装 php56 了。
brew 的安装:
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)“
brew doctor
brew tap homebrew/php
sudo apachectl stop
brew install httpd
sudo brew services start httpd
brew install php56 –with-httpd
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
brew cask install macdown