Fatal error: Uncaught exception 'think\exception\ErrorException' with message 'Error while sending STMT_CLOSE packet.' 问题出在数据库连接类Connection里面的错误处理没有完全处理完,解决办法如下: 把query和execute方法里面的try扩大范围 把try放在 $this->free 方法上面即可 try {
//释放前次的查询结果
if (!empty($this->PDOStatement) && $this->PDOStatement->queryString != $sql) {
$this->free();
} 最佳答案