php压缩CSS文件"\r\n", &

From , 4 Years ago, written in PHP, viewed 54 times.
URL https://pastebin.vip/view/040a99f2
  1. header('Content-type: text/css');
  2. ob_start("compress");
  3. function compress($buffer) {
  4.   /* remove comments */
  5.   $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
  6.   /* remove tabs, spaces, newlines, etc. */
  7.   $buffer = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);
  8.   return $buffer;
  9. }
  10.  
  11. /* your css files */
  12. include('master.css');
  13. include('typography.css');
  14. include('grid.css');
  15. include('print.css');
  16. include('handheld.css');
  17.  
  18.  

Reply to "php压缩CSS文件"\r\n", &"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website