PDOException Object ( [message:protected] => SQLSTATE[HY000] [2002] Connection refused [string:Exception:private] => [code:protected] => 2002 [file:protected] => /data/newssite/sites/www.zhilong123.com/DB.php [line:protected] => 16 [trace:Exception:private] => Array ( [0] => Array ( [file] => /data/newssite/sites/www.zhilong123.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.zhilong123.com/tag.php [line] => 16 [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] => )
Fatal error: Uncaught Error: Call to a member function prepare() on null in /data/newssite/sites/www.zhilong123.com/DB.php:151 Stack trace: #0 /data/newssite/sites/www.zhilong123.com/tag.php(18): DB->getNewsByTag('\xE5\x9F\xB9\xE5\x85\xBB\xE5\xAD\xA9\xE5\xAD\x90') #1 {main} thrown in /data/newssite/sites/www.zhilong123.com/DB.php on line 151