Home > Backend Development > PHP Tutorial > PHP filter dangerous html code_PHP tutorial

PHP filter dangerous html code_PHP tutorial

WBOY
Release: 2016-07-21 15:45:23
Original
929 people have browsed it

#HTML posted by users, filter dangerous codes

Copy code The code is as follows:

function uh($str)
{
$farr = array(
"/s+/", //Filter excess whitespace
"/<(/?)(scripti?framestylehtmlbodytitlelinkmeta?%)([^>]*? )>/isU", //Filter
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template