摘要:
//获取请求参数 get|post $data['get']=\PhalApi\DI()->request->get('city_id'); //获取客户端ip $data['ip'] = \PhalApi\Tool::getClientIp(); //根目录 $data['root_path'] 阅读全文
摘要:
//日志 // \PhalApi\DI()->logger->error('fail to insert DB', 'error'); // \PhalApi\DI()->logger->info('fail to insert DB', 'test'); // \PhalApi\DI()->log 阅读全文
摘要:
1.di.php // 缓存 - Memcache/Memcached // $di->cache = new \PhalApi\Cache\MemcacheCache(\PhalApi\DI()->config->get('sys.mc'));; //redis缓存 // $di->cache = 阅读全文
摘要:
$where = ['a.module_id' => $module_id, 'b.city_id' => $city_id];if ($title) { $where['b.name like ?'] = '%' . $title . '%';}$model = GoodsModel::notor 阅读全文