route.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkAdmin
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2014~2022 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: https://thinkadmin.top
  8. // +----------------------------------------------------------------------
  9. // | 开源协议 ( https://mit-license.org )
  10. // | 免费声明 ( https://thinkadmin.top/disclaimer )
  11. // +----------------------------------------------------------------------
  12. // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
  13. // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
  14. // +----------------------------------------------------------------------
  15. return [
  16. // pathinfo分隔符
  17. 'pathinfo_depr' => '/',
  18. // URL伪静态后缀
  19. 'url_html_suffix' => 'html',
  20. // URL普通方式参数 用于自动生成
  21. 'url_common_param' => true,
  22. // 是否开启路由延迟解析
  23. 'url_lazy_route' => false,
  24. // 是否强制使用路由
  25. 'url_route_must' => false,
  26. // 合并路由规则
  27. 'route_rule_merge' => true,
  28. // 路由是否完全匹配
  29. 'route_complete_match' => true,
  30. // 访问控制器层名称
  31. 'controller_layer' => 'controller',
  32. // 空控制器名
  33. 'empty_controller' => 'Error',
  34. // 是否使用控制器后缀
  35. 'controller_suffix' => false,
  36. // 默认的路由变量规则
  37. 'default_route_pattern' => '[\w\.]+',
  38. // 是否开启请求缓存 true 自动缓存 支持设置请求缓存规则
  39. 'request_cache' => false,
  40. // 请求缓存有效期
  41. 'request_cache_expire' => null,
  42. // 全局请求缓存排除规则
  43. 'request_cache_except' => [],
  44. // 默认应用
  45. 'default_app' => 'index',
  46. // 默认控制器名
  47. 'default_controller' => 'Index',
  48. // 默认操作名
  49. 'default_action' => 'index',
  50. // 操作方法后缀
  51. 'action_suffix' => '',
  52. // 默认JSONP格式返回的处理方法
  53. 'default_jsonp_handler' => 'jsonpReturn',
  54. // 默认JSONP处理方法
  55. 'var_jsonp_handler' => 'callback',
  56. ];