如何隱藏錯誤的,例如像這樣無法隱藏的錯誤消息
You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near '\\\') as previousid,
(SELECT IFNULL(min(id),-1) FROM bikes WHERE' at line 2
我已經把off
上display_errors = Off
和error_reporting = E_ALL & ~E_NOTICE
也無所謂,如果我把error_reporting(0);
對我的代碼或@
頂部查詢之前。該錯誤始終顯示。
編輯:
$q = mysqli_query($con, 'SELECT *,
(SELECT IFNULL(max(id),-1) FROM bikes WHERE `id` < '.($currentId).') as previousid,
(SELECT IFNULL(min(id),-1) FROM bikes WHERE `id` > '.($currentId).') as nextid
FROM bikes WHERE `id` = ' . ($currentId)))
,如果我嘗試在URL可以說bikes.php?id='
或其他爲sql注入我得到這個我的網頁上。
查詢工作正常,這是當我嘗試操縱(sql注入)在URL中。然後它顯示了這一點,我想隱藏它。我不想顯示我的表信息..等
好了,會通過修復它! – Pankucins
這是當我嘗試模擬SQL注入的URL .. – Goro
告訴我們你的php代碼,你在查詢這個 – SajithNair