PHP ODBC Driver 安裝

#Ubuntu 16.04
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add –
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install unixodbc-dev

apt-get install php-pear
apt-get install php-devpecl install sqlsrv-5.3.0
pecl install pdo_sqlsrv-5.3.0
echo "extension=sqlsrv.so" | sudo tee –append /etc/php/7.0/fpm/php.ini
echo "extension=pdo_sqlsrv.so" | sudo tee –append /etc/php/7.0/fpm/php.ini
service php7.0-fpm restart