📜  php pdo 错误 500 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:41.402000             🧑  作者: Mango

代码示例1
try {
    $dsn = "mysql:dbname=testdb;host={$db_host1}";
    $dbh = new PDO($dsn, $db_username, $db_password);
} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "
"; die(); }