PDOException Object ( [message:protected] => SQLSTATE[HY000] [2002] Connection refused [string:Exception:private] => [code:protected] => 2002 [file:protected] => /data/newssite/sites/www.nxqzt.com/DB.php [line:protected] => 16 [trace:Exception:private] => Array ( [0] => Array ( [file] => /data/newssite/sites/www.nxqzt.com/DB.php [line] => 16 [function] => __construct [class] => PDO [type] => -> [args] => Array ( [0] => mysql:host=127.0.0.1;dbname=news [1] => root [2] => Irk818$#12 ) ) [1] => Array ( [file] => /data/newssite/sites/www.nxqzt.com/detail.php [line] => 25 [function] => __construct [class] => DB [type] => -> [args] => Array ( [0] => Array ( [database] => news [username] => root [password] => Irk818$#12 [port] => 3306 [host] => 127.0.0.1 ) ) ) ) [previous:Exception:private] => [errorInfo] => )
Notice: A non well formed numeric value encountered in /data/newssite/sites/www.nxqzt.com/DB.php on line 56

Fatal error: Uncaught Error: Call to a member function prepare() on null in /data/newssite/sites/www.nxqzt.com/DB.php:62 Stack trace: #0 /data/newssite/sites/www.nxqzt.com/detail.php(27): DB->getNewsById(20190712) #1 {main} thrown in /data/newssite/sites/www.nxqzt.com/DB.php on line 62