1. 安装
npm install uglify-js -g
2. 单文件压缩
uglifyjs .\u17.js -o u17.min.js
3. 谁教下我怎么混淆?
1. 安装
npm install uglify-js -g
2. 单文件压缩
uglifyjs .\u17.js -o u17.min.js
3. 谁教下我怎么混淆?
假设你的项目项目使用composer
1. 安装,为了兼容php5.4使用的是1.x版本
composer require twig/twig:~1.0
2. 封装为trait以集成
namespace objects\Traits; trait DoufuTwig { /** * @var \Twig_Environment */ private $twig; protected function renderTwig($path, $data = []) { if (! $this->twig) { $loader = new \Twig_Loader_Filesystem(APPPATH . 'views'); $this->twig = new \Twig_Environment($loader, array( 'cache' => APPPATH . 'cache', 'auto_reload' => true )); } return $this->twig->render($path, $data); } }
3. 使用
集成到控制器父类
namespace Ncontrollers; use objects\Traits\DoufuTwig; abstract class Controller { use DoufuTwig; }
控制器内使用
... echo $this->renderTwig('xxx/login.html'); ...
xtrabackup –backup –compress –target-dir=/mysqlbackup/full –user=aaa –host=hostname –password=xxxx –databases=ggggg
xtrabackup –backup –compress –target-dir=/mysqlbackup/incr –incremental-basedir=/mysqlbackup/full –user=aaa –host=hostname –password=xxxx –databases=ggggg
–compress 压缩