PHP防止SQL注入

咱們在查詢數據庫時,出於安全考慮,須要過濾一些非法字符防止SQL惡意注入,請看一下函數: 複製代碼代碼以下: function injCheck($sql_str) { $check = preg_match('/select|insert|update|delete|'|/*|*|../|./|union|into|load_file|outfile/', $sql_str);
相關文章
相關標籤/搜索