提示这个错误 哪里不对了?
( ! ) parse error: syntax error, unexpected '->' (t_object_operator), expecting ')' in d:\wamp\www\prepare.php on line 4
代码如下
$pdo=new pdo("mysql:host=localhost;dbname=t1","root","");
$stnt=$pdo->prepare("insert into blog2 (type,name,num,content)values(:type,:name,:num,:content) ");
$stnt->execute(array("type"->"5","name"->"5","num"->"5","content"->"5"));
?>
$stnt->execute(array(":type"=>"5",":name"=>"5",":num"=>"5",":content"=>"5"));
$stnt->execute(array(":type"=>"5",":name"=>"5",":num"=>"5",":content"=>"5"));
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号