<?php
header("Content-Type: text/html;charset=utf-8");
$servername = "localhost";
$username = "root";
$password = "root";
try{
$conn = new PDO("mysql:host=$servername;",$username,$password);
echo "连接成功!";
}
catch(PDOEXception $e)
{
echo $e->getMessage();
}
$conn = null;//关闭连接
?>
PHP 使用POD连接数据库
最新推荐文章于 2022-03-10 13:45:55 发布