企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## document\_root 配置静态文件根目录,与enable_static_handler配合使用。 ~~~ $server->set([ 'document_root' => '/data/webroot/example.com', 'enable_static_handler' => true, ]); ~~~ 设置document_root并设置enable_static_handler为`true`后,底层收到Http请求会先判断document_root路径下是否存在此文件,如果存在会直接发送文件内容给客户端,不再触发onRequest回调。