Home  >  Article  >  Backend Development  >  PHP custom function: clear all js, html, css code on the page_PHP tutorial

PHP custom function: clear all js, html, css code on the page_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:41:551071browse

PHP custom function: clear all js, html, css codes on the page

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