$db = new PDO('mysql:dbname=xnews;host=localhost;port=' . $LOCAL_DB_PORT,
$LOCAL_DB_USER,
$LOCAL_DB_PASS,
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'")
);
reports:
Undefined class constant
'MYSQL_ATTR_INIT_COMMAND'
Is it renamed?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…