摘要: //获取请求参数 get|post $data['get']=\PhalApi\DI()->request->get('city_id'); //获取客户端ip $data['ip'] = \PhalApi\Tool::getClientIp(); //根目录 $data['root_path'] 阅读全文
posted @ 2021-07-22 16:02 CanyingV 阅读(36) 评论(0) 推荐(0) 编辑
摘要: //日志 // \PhalApi\DI()->logger->error('fail to insert DB', 'error'); // \PhalApi\DI()->logger->info('fail to insert DB', 'test'); // \PhalApi\DI()->log 阅读全文
posted @ 2021-07-22 16:01 CanyingV 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1.di.php // 缓存 - Memcache/Memcached // $di->cache = new \PhalApi\Cache\MemcacheCache(\PhalApi\DI()->config->get('sys.mc'));; //redis缓存 // $di->cache = 阅读全文
posted @ 2021-07-22 15:59 CanyingV 阅读(66) 评论(0) 推荐(0) 编辑
摘要: $where = ['a.module_id' => $module_id, 'b.city_id' => $city_id];if ($title) { $where['b.name like ?'] = '%' . $title . '%';}$model = GoodsModel::notor 阅读全文
posted @ 2021-07-22 15:56 CanyingV 阅读(55) 评论(0) 推荐(0) 编辑