企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 基本访问 HDPHP 为了简化操作废弃了老框架中的pathinfo、兼容模式,保留了老框架中的GET模式,增强了路由处理。 > 让使用变得简单、高效才是框架的目的,而不是一味的增加无用的功能。 影响url 访问的配置项如下: ``` array( //基于https协议 'https' => FALSE, //url重写模式 'rewrite' => FALSE, //URL变量 'url_var' => 's', //禁止使用的模块 'deny_module' => [ ], //默认模块 'default_module' => 'home', //默认控制器 'default_controller' => 'entry', //默认方法 'default_action' => 'index', //缓存路由 'route_cache' => FALSE ); ``` 如果访问Home\UserController控制器中的show 方法,请求地址为: ``` http://hdphp.com?s=home/user/show ``` ###u 函数 u函数可以根据提供的参数生成标准的URL,语法结构如下: ``` u(路径, $args = 参数); ``` 使用方法: ``` u('Home.User.login',['cid'=>1,'type'=>2]); ``` 以上设置会生成地址为:?m=home/user/login&cid=1&type=2