111
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

115 line
3.6 KiB

  1. <?php
  2. /**
  3. * 框架默认配置,请勿直接修改本惯性配置文件,避免影响系统升级!
  4. * 需要自定义时候请在站点config目录下新建config.php配置,对需要修改的参数复写
  5. */
  6. return array(
  7. // 调试模式
  8. 'debug' => false,
  9. // 系统授权码
  10. 'sn' => '281BE285D7',
  11. // 内核版本
  12. 'core_version' => '1.6.1',
  13. // 配置模块
  14. 'public_app' => 'home,admin,api',
  15. // 设置URL模式,1、基本模式,2、伪静态模式,3、兼容模式
  16. 'url_type' => 1,
  17. // 模板编译缓存开关
  18. 'tpl_parser_cache' => 1,
  19. // 模板内容输出缓存开关
  20. 'tpl_html_cache' => 0,
  21. // 模板内容缓存有效时间(秒)
  22. 'tpl_html_cache_time' => 900,
  23. // URL允许的特殊字符,正则模型或直接写 ,如:\*
  24. 'url_allow_char' => '',
  25. // URL地址后缀名
  26. 'url_suffix' => '.html',
  27. // URL地址路由,如:// 'home/index' => 'home/index/index'
  28. 'url_route' => array(),
  29. // 应用域名绑定 ,支持到模块、控制器、方法,如:'localhost'=>'admin'
  30. 'app_domain_blind' => array(),
  31. // 模块模板路径定义,不定义均采用框架默认
  32. 'tpl_dir' => array(
  33. 'home' => '/template'
  34. ),
  35. // 控制器返回数据输出方式
  36. 'return_data_type' => 'html',
  37. // 日志记录方式,text文本记录,db为数据库记录
  38. 'log_record_type' => 'db',
  39. // 默认分页大小
  40. 'pagesize' => 15,
  41. // 分页条数字数量
  42. 'pagenum' => 5,
  43. // 会话文件使用网站路径
  44. 'session_in_sitepath' => 1,
  45. // 配置会话缓存,files,memcache,redis
  46. 'session' => array(
  47. 'handler' => 'files',
  48. 'path' => 'tcp://127.0.0.1:11211;'
  49. ),
  50. // 缓存服务器配置,memcache,redis, server支持多节点server1,server2...
  51. 'cache' => array(
  52. 'handler' => 'memcache',
  53. 'server' => array(
  54. 'host' => '127.0.0.1',
  55. 'port' => '11211'
  56. )
  57. ),
  58. // 访问页面规则,如禁用浏览器、操作系统类型
  59. 'access_rule' => array(
  60. 'deny_bs' => '', // 如:IE6,IE7,IE8,不允许IE6,IE7,IE8
  61. 'allow_bs' => '', // 如:IE11,只允许IE11
  62. 'deny_os' => '', // 如:Windows 9X,不允许Windows 9X
  63. 'allow_os' => '' // 如:Windows 10,只允许Windows 10
  64. ),
  65. // 上传配置
  66. 'upload' => array(
  67. 'format' => 'jpg,jpeg,png,gif,xls,xlsx,doc,docx,ppt,pptx,rar,zip,pdf,txt,mp4,avi,flv,rmvb,mp3,otf,ttf',
  68. 'max_width' => '1920',
  69. 'max_height' => ''
  70. ),
  71. // 缩略图配置
  72. 'ico' => array(
  73. 'max_width' => '1000',
  74. 'max_height' => '1000'
  75. ),
  76. // 数据库连接配置,主从配置时,如果配置多台从服务器,通过在slave下数组配置slave1,slave2...
  77. 'database' => array(
  78. 'type' => 'mysqli', // 数据库连接驱动 mysqli,sqlite,pdo_mysql,pdo_sqlite,pdo_pgsql
  79. 'prefix' => 'ay_', // 数据库表前缀
  80. 'charset' => 'utf8', // 数据库编码
  81. 'transaction' => false, // 开启事务
  82. 'host' => '127.0.0.1', // 数据库服务器
  83. 'user' => 'root', // 数据库连接用户名
  84. 'passwd' => 'root', // 数据库连接密码
  85. 'port' => '3306', // 数据库端口
  86. 'dbname' => 'pboot' // 数据库名称,如果Sqlite直接填写路径,如:/data/pboot.db
  87. // 'slave' => array( 'host' => '127.0.0.1','user' => 'root','passwd' => 'root','port' => '3306','dbname' => 'pboot')
  88. )
  89. );