php 过滤<script></script&
2019-02-25 本文已影响0人
observerb
$line="111<script>asdfkjasdklfjaksdfjl;asdfkl</script>222";
$a=preg_replace_callback(
'/<script[\s\S]*?<\/script>/',
function ($matches) {
return strtolower($matches[0]);
},
$line
);
$line="111<script>asdfkjasdklfjaksdfjl;asdfkl</script>222";
$a=preg_replace_callback(
'/<script[\s\S]*?<\/script>/',
function ($matches) {
return strtolower($matches[0]);
},
$line
);