源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

php压缩多个CSS为一个css的代码并缓存

  • 时间:2021-10-15 07:26 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:php压缩多个CSS为一个css的代码并缓存
[u]复制代码[/u] 代码如下:
<?php /* 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();
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部