Skip to content

Commit 731e81d

Browse files
authored
PDO预处理取消在本地模拟
解决GET方式请求获取article列表时,page、size参数无效,无法获取article列表问题。
1 parent 5bc1048 commit 731e81d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

db.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
2-
$pdo = new PDO('mysql:host=localhost;dbname=restful','root','root');
3-
return $pdo;
2+
$pdo = new PDO('mysql:host=localhost;dbname=restful','root','root',[PDO::ATTR_EMULATE_PREPARES=>false]);
3+
return $pdo;

0 commit comments

Comments
 (0)