摘要:
实例化请求对象 $request = Request::instance(); $request = request(); 获取请求信息 $request = Request::instance(); // 获取当前域名 echo 'domain: ' . $request->domain() . 阅读全文
摘要:
路由开关模式 普通模式 'url_route_on' => false, 混合模式 'url_route_on' => true, 'url_route_must'=> false, 强制模式 'url_route_on' => true, 'url_route_must' => true, 路由定 阅读全文
摘要:
配置目录 系统默认的配置文件目录就是应用目录application下面 定义配置文件目录和应用目录同级 define('CONF_PATH', __DIR__.'/../config/'); 读取配置 echo \think\Config::get('default_return_type'); e 阅读全文
摘要:
composer方式下载源码 composer create-project topthink/think=5.0.* tp5 --prefer-dist nginx配置(默认不支持path_info模式,要使用?s=/的方式访问地址) server { listen 80; server_name 阅读全文