命令
sudo apt install apache2
sudo apt install php7.0
sudo apt install libapache2-mod-php7.0
sudo apt-get install mysql-server
sudo apt-get install php7.0-mysql
sudo service mysql restart
sudo service apache2 restart
测试 :
<?php
ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
$conn=mysqli_connect("localhost","root","");
if($conn){
echo "connect to mysql-server sucessfully.";
}
?>