复制代码 代码如下:
/*
compress multiple css files into one and cache for an hour.
use the same code for javascript, but replace below text/css with text/javascript and of course make sure you include .js files instead of .css ones.
*/
ob_start(ob_gzhandler);
header(content-type: text/css; charset: utf-8);
header(expires: .gmdate(d, d m y h:i:s, time() + 60*60). gmt);
include('somefile.css');
echo \n\n;
include('anotherfile.css');
echo \n\n;
ob_flush();
以上就介绍了case western reserve universit php压缩多个css为一个css的代码并缓存,包括了case western reserve universit方面的内容,希望对php教程有兴趣的朋友有所帮助。