Home  >  Article  >  Backend Development  >  Remove all js, html, css code in php_PHP tutorial

Remove all js, html, css code in php_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:33:501005browse

Copy code The code is as follows:

$search = array ("' ]*?>.*?'si", // Remove javascript
"']*?>.*?'si", // Remove css
"'<[/!]*?[^<>]*?>'si", // Remove HTML tags
"'