<?php
//读取数据的写法:
$servername="localhost";
$usename="root";
$password="";
$mydb="demo";
//创建链接
$mysqli=new mysqli($servername,$usename,$password,$mydb);
//判断连接是否成功
if($mysqli->connect_error){
//读取数据的写法:
$servername="localhost";
$usename="root";
$password="";
$mydb="demo";
//创建链接
$mysqli=new mysqli($servername,$usename,$password,$mydb);
//判断连接是否成功
if($mysqli->connect_error){