how can find element in string php function strpos
. parse error whenever execute function $error string.
[symfony\component\debug\exception\fatalerrorexception] parse error
$error = 'you have error in sql syntax; check manual corresponds mysql server version right syntax use near '"=<script>alert('o7v87r99ib')</script>"' @ line 1'; $str = '=<script>alert('o7v87r99ib')</script>'; if(strpos($error, $str)){ echo 'found: ' . $str; }
you have multiple errors, $error
string not valid string. missing $
str
in echo.
<?php $error = 'you have error in sql syntax; check manual corresponds mysql server version right syntax use near \'"=<script>alert(\'o7v87r99ib\')</script>"\' @ line 1'; $str = "=<script>alert('o7v87r99ib')</script>"; if(strpos($error, $str)){ echo 'found: ' .$str; }
Comments
Post a Comment