Home  >  Article  >  Backend Development  >  A PHP that thinks it is very safe to prevent SQL injection, please crack it

A PHP that thinks it is very safe to prevent SQL injection, please crack it

WBOY
WBOYOriginal
2016-07-25 08:50:551101browse
Haha, please crack it
  1. function gejj($str)
  2. {
  3. $farr = array(
  4. "/\s+/",
  5. "/<(\/?)(script|i?frame|style|html|body|title |link|meta|object|\?|\%)([^>]*?)>/isU",
  6. "/(<[^>]*)on[a-zA-Z]+ s*=([^>]*>)/isU",
  7. );
  8. $str = preg_replace($farr,"",$str);
  9. return addslashes($str);
  10. }
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn