为什么使用exex方法,打印出来是false
<?php
//连接数据库
$dsn = 'mysql:host=127.0.0.1;dbname = php';
$pdo = new PDO($dsn, 'root', '');
//SQL语句
$sql=<<<EOF
CREATE TABLE user(
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(20) NOT NULL UNIQUE,
password CHAR(32) NOT NULL,
email VARCHAR(30) NOT NULL
);
EOF;
$RE = $pdo->exec($sql);
var_dump($RE);
?>
结果是: boolean false