ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
# business.php 业务上的一些配置。 * 设置前缀后访问controller的方法会根据设置加上前缀名。 比如 http://localhost/Test/test ,对应的方法是**Test**, Controller中的 **http_test**。 如果没有http\_test方法将会返回404页面。 (注意即将移除,会合并到ports端口设置中) * 设置域名访问的时候对应的根目录名称,和默认界面。 如上的设置当用localhost域名访问的时候会跳转到www/localhost目录下的index.html。 而用127.0.0.1访问的时候由于没有配置映射关系会访问www目录下的index.html。 * gzip_off:设置为true则全局强制关闭gzip压缩。 ```php //强制关闭gzip $config['http']['gzip_off'] = false; //默认访问的页面 $config['http']['index'] = 'index.html'; //是否服务器启动时自动清除群组信息 $config['autoClearGroup'] = true; /** * 设置域名和Root之间的映射关系 */ $config['http']['root'] = [ 'default' => [ 'root' => 'localhost', 'index' => 'index.html' ] , 'localhost' => [ 'root' => 'www', 'index' => 'Index.html' ], 'sder.xin' => [ 'root' => 'www', 'index' => 'Index.html' ], 'www.sder.xin' => [ 'root' => 'www', 'index' => 'Index.html' ], '182.92.224.125' => [ 'root' => 'docs', 'index' => 'index.html' ], 'docs.sder.xin' => [ 'root' => 'docs', 'index' => 'index.html' ] ]; return $config; ```