/*
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教程有兴趣的朋友有所帮助。
以上就是case western reserve universit php压缩多个CSS为一个css的代码并缓存的详细内容,更多请关注php学习网其它相关文章!

- 上一篇: 用php读取xml soap,该怎么处理
- 下一篇:php网页上传显示代码问题
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论