LAMP环境搭建
LAMP环境搭建
http://www.cnblogs.com/mingc/p/7864030.html
linux
apache
sudo apt-get install apache2
mysql
sudo apt-get install mysql-server
php
sudo apt-get install php7.1 php7.1-dev
PHP 连接测试脚本
<?php
$link=mysql_connect('localhost','root','');
if ($link)
echo "successfu";
else
echo "Faile";
mysql_close();
?>
errors
无法连接数据库
Fatal error: Call to undefined function mysql_connect()
sudo apt-get install php5-mysql
sudo apt-get install mysql-server