PHP致命错误:找不到类'PDO'

时间:2017-10-10 12:02:09

标签: php mysql pdo

登录时出现问题& error_log在connecion.php文件中显示 PHP致命错误:未找到类'PDO'
php connection.php代码:

<? php
$dsn = 'mysql:host=localhost;dbname=bot_db';
$username = 'bot_db';
$password = '**********';
try {
    $con = new PDO($dsn, $username, $password);
} catch (PDOException $e) {
    $error_message = $e->getMessage();
    include('../errors/err.php');
    exit();
}  
?>

中显示致命错误
$con = new PDO($dsn, $username, $password);

0 个答案:

没有答案