合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
1.hook钩子与行为 通过配置文件执行钩子行为 ![](https://img.kancloud.cn/09/ca/09ca754029566f65712f077ad0868745_762x384.png) ``` public function index(){ Hook::listen('test'); echo cache('name3'); } ``` ``` <?php namespace app\index\controller; use think\Controller; class A{ public function run(){ $this->a1(); $this->b1(); $this->c1(); } public function a1(){ cache('name1',1); } public function b1(){ cache('name2',2); } public function c1(){ cache('name3',3); } } ```