PHP连接数据库 <?php header("Content-Type:text/html;charset=utf8"); $mysql_server_name = "localhost:3306"; //数据库端口 $mysql_username = "root"; //用户名 $mysql_password = "123456"; //密码 $mysql_database = "test"; //数据库名称 ?>