Answers for "php pdo error 500"

PHP
0

php pdo error 500

try {
    $dsn = "mysql:dbname=testdb;host={$db_host1}";
    $dbh = new PDO($dsn, $db_username, $db_password);
} catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
}
Posted by: Guest on September-10-2021

Browse Popular Code Answers by Language