public function handle($request, \Closure $next)
 {
     // Perform action
     /*
     |------------------------------------------------
     | 载入系统初始化信息 Vo.config.php初始化 App/Config/Config.php
     |------------------------------------------------
     */
     //载入模块配置信息
     dc('Vo', config('Vo.config'));
     //vc() 获取
     //环境信息
     dc('Environment', \Grace\Environment::getInstance()->all());
     //get / post 信息
     $res['get'] = sapp('req')->get;
     $res['post'] = sapp('req')->post;
     dc('Req', $res);
     /*
     |--------------------------------------------------------
     | 模块信息 / 根据根据get post 获取
     |--------------------------------------------------------
     */
     //
     if (dc('Req')['get']['m']) {
         //修改fc 记录用户config
         $file = rtrim(APPROOT, '/') . '/Modules/' . dc('Modulelist')[dc('Req')['get']['m']] . '/Conf.php';
         $config = $this->load($file);
         //对跟配置进行重写
         foreach ($config as $key => $value) {
             dc($key, $value);
         }
         //dc('Module',$config);
     }
     return $next($request);
 }
Example #2
0
 public function getquery()
 {
     $query = \Grace\Environment::getInstance()->all()['query'];
     $_p = array();
     $_query = explode('&', $query);
     foreach ($_query as $k => $value) {
         //存在=号
         $p = explode('=', $value);
         if (!empty($p[0])) {
             $_p[$p[0]] = isset($p[1]) ? $p[1] : '';
         }
     }
     return $_p;
     //获得通过querystring 分析出来的参数
 }