Maison >développement back-end >tutoriel php >php-新手在此 谢谢各位前辈了!!
php
$dbms='mysql';
$dbName='luo';
$user='root';
$pwd='root';
$host='localhost';
$dsn="$dbms:host=$host;dbname=$dbName";
try{
$pdo=new PDO($dsn,$user,$pwd);
$query="select * from tb_affiche";
$result=$pdo->prepare($query);
$result->execute();
while($res=$result->fetch(PDO::FETCH_ASSOC)){
?>
删除 |
}
echo "PDO链接Mysql";
}catch(Exception $e){
echo $e->getMessage()."
";
}
?>
出现Notice: Use of undefined constant createtime - assumed 'createtime' in D:\WWW\aff.php on line 24
错误