app.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 应用设置
  4. // +----------------------------------------------------------------------
  5. use think\facade\Env;
  6. return [
  7. // 应用地址
  8. 'app_host' => Env::get('app.host', ''),
  9. // 应用的命名空间
  10. 'app_namespace' => '',
  11. // 是否启用路由
  12. 'with_route' => true,
  13. // 是否启用事件
  14. 'with_event' => true,
  15. // 开启应用快速访问
  16. 'app_express' => true,
  17. // 默认应用
  18. 'default_app' => 'index',
  19. // 开启自动多模式
  20. 'auto_multi_app' => true,
  21. // 默认时区
  22. 'default_timezone' => 'Asia/Shanghai',
  23. // 应用映射(自动多应用模式有效)
  24. 'app_map' => [
  25. Env::get('easyadmin.admin', 'admin') => 'admin',
  26. ],
  27. // 后台别名
  28. 'admin_alias_name' => Env::get('easyadmin.admin', 'admin'),
  29. // 域名绑定(自动多应用模式有效)
  30. 'domain_bind' => [],
  31. // 禁止URL访问的应用列表(自动多应用模式有效)
  32. 'deny_app_list' => ['common'],
  33. // 异常页面的模板文件
  34. 'exception_tmpl' => Env::get('app_debug') == 1 ? app()->getThinkPath() . 'tpl/think_exception.tpl' : app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'think_exception.tpl',
  35. // 跳转页面的成功模板文件
  36. 'dispatch_success_tmpl' => app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl',
  37. // 跳转页面的失败模板文件
  38. 'dispatch_error_tmpl' => app()->getBasePath() . 'common' . DIRECTORY_SEPARATOR . 'tpl' . DIRECTORY_SEPARATOR . 'dispatch_jump.tpl',
  39. // 错误显示信息,非调试模式有效
  40. 'error_message' => '页面错误!请稍后再试~',
  41. // 显示错误信息
  42. 'show_error_msg' => true,
  43. // 静态资源上传到OSS前缀
  44. 'oss_static_prefix' => Env::get('easyadmin.oss_static_prefix', 'static_easyadmin'),
  45. ];