app.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | 应用设置
  13. // +----------------------------------------------------------------------
  14. use think\facade\Env;
  15. return [
  16. // 应用地址
  17. 'app_host' => Env::get('app.host', ''),
  18. // 应用的命名空间
  19. 'app_namespace' => '',
  20. // 是否启用路由
  21. 'with_route' => true,
  22. // 是否启用事件
  23. 'with_event' => true,
  24. // 自动多应用模式
  25. 'auto_multi_app' => true,
  26. // 应用映射(自动多应用模式有效)
  27. 'app_map' => ['*' => '', 'api' => 'api', 'adminapi' => 'adminapi', 'admin' => 'admin', 'badmin' => 'badmin', 'badminapi' => 'badminapi', 'cadminapi' => 'cadminapi', 'bapi' => 'bapi'],
  28. // 域名绑定(自动多应用模式有效)
  29. 'domain_bind' => [],
  30. // 禁止URL访问的应用列表(自动多应用模式有效)
  31. 'deny_app_list' => [],
  32. // 默认应用
  33. 'default_app' => 'wap',
  34. // 默认时区
  35. 'default_timezone' => 'Asia/Shanghai',
  36. // 异常页面的模板文件
  37. 'exception_tmpl' => app()->getRootPath() . 'public/statics/exception.tpl',
  38. // 错误显示信息,非调试模式有效
  39. 'error_message' => '页面错误!请稍后再试~',
  40. // 显示错误信息
  41. 'show_error_msg' => false,
  42. // admin Api 版本
  43. 'app_adminapi_version' => 'v1',
  44. ];