其他
你可能还需要 php yuicompressor : http://code.google.com/p/php-yui-compressor-class/
php 使用 closure complier压缩或批量压缩 js和css类.
本类通过 windows 和 linux平台测试 有任何问题请反馈到: http://ganquan.info/
使用方式:
``` /* * PHP Closure Complier Class (Dual licensed under the MIT) * 风吟 (http://ganquan.info/) ---------------------------------------------------------- 要求: jdk 1.6+ php exec() 作用: 使用 Closure Complier 批量压缩一个或多个和目录的 js文件. ---------------------------------------------------------- */
//Windows 调用方式: /* $complier = new closure_complier(array( 'java_home'=>'java', //或自己指定 jdk 安装的 bin 目录 (绝对路径) 'jar_file'=>'D:\www\htdocs\compiler.jar', 'save_path'=>'D:\www\htdocs\results\', //必须有可写权限 //---------------------------------------- 压缩配置 ---------------------------------------- // 'optimization'=>'SIMPLEOPTIMIZATIONS', //(默认为简单) WHITESPACEONLY(空白) ADVANCED_OPTIMIZATIONS (很黄很暴力) 'charset'=>'utf-8', //文件的编码,推荐使用utf-8. 'customize'=>'', //如
php
js
压缩
ClosureComplier
批量
使用
暂无评论