Home > Backend Development > PHP Tutorial > PHP filters unsafe html_PHP tutorial

PHP filters unsafe html_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 17:09:13
Original
787 people have browsed it

php filters unsafe html Use PHP to filter code in html that may be exploited to introduce external dangerous content. Sometimes, users need to submit html content,
In order to enrich the information posted by users, of course, some codes that may cause confusion in the display page layout are also included in the filtering scope.


The following is a quote:
#HTML posted by users, filter dangerous codes
function uh($str)
{
$farr = array(
"/s+/",                                                                                           //Filter out excess whitespace
"/<(/?)(script|i?frame|style|html|body|title|link|meta|?|%)([^>]*?)>/isU",
//Filter

Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template