Assetic is a PHP resource management framework for merging and compressing CSS/JS resources.
The sample code is as follows:
Copy the code The code is as follows:
use AsseticAssetAssetCollection;
use AsseticAssetFileAsset;
use AsseticAssetGlobAsset;
$js = new AssetCollection(array(
new GlobAsset('/path/to/js/*'),
new FileAsset(' /path/to/another.js'),
));
// the code is merged when the asset is dumped
echo $js->dump();
Using this method to merge resources can reduce the number of browser requests for resources, reduce resource download size, and speed up the site. Also eliminates a lot of unnecessary HTTP requests.
http://www.bkjia.com/PHPjc/788641.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/788641.htmlTechArticleAssetic is a PHP resource management framework for merging and compressing CSS/JS resources. The sample code is as follows: Copy the code The code is as follows: ?php use AsseticAssetAssetCollection; use Asseti...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn