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.
 
 
 
 

190 lines
5.3 KiB

  1. <?php
  2. include KX_ROOT . '/env.php';
  3. return [
  4. 'app' => [
  5. 'debug' => APP_ENV !== 'production',
  6. 'mode' => PHP_SAPI == 'cli' ? 'cli' : 'web',
  7. 'env' => APP_ENV,
  8. 'fastcgi_buffer_fill' => true,
  9. 'fastcgi_buffer_size' => 124,
  10. 'phpbin' => defined('PHPPATH') ? PHPPATH : 'php',
  11. ],
  12. 'auth' => [
  13. 'crypto_key' => 'www.kxcms.com',
  14. 'active_effective' => 24 * 60 * 60,
  15. 'max_age' => 7 * 24 * 60 * 60,
  16. ],
  17. 'url' => [
  18. 'ignore_param' => [
  19. 'key',
  20. 'novelid',
  21. 'pinyin',
  22. 'chapterid',
  23. 'categoryid',
  24. 'subcategoryid',
  25. 'pageid',
  26. 'authorid',
  27. 'name',
  28. 'subnovelid',
  29. 'subnovelidplus',
  30. ],
  31. 'default_data' => [
  32. 'page' => '1',
  33. 'siteid' => '0',
  34. ],
  35. 'auto_calc' => [
  36. 'novelid' => [
  37. [ 'name' => 'subnovelid', 'func' => 'subid' ],
  38. [ 'name' => 'subnovelidplus', 'func' => 'subidplus' ],
  39. ],
  40. ],
  41. ],
  42. 'rewrite' => [
  43. 'power' => true,
  44. ],
  45. 'view' => [
  46. 'driver' => 'mc',
  47. ],
  48. 'plugin' => [
  49. 'app_init' => [],
  50. 'app_start' => [
  51. \App\Plugin\ConfigCache\ConfigCache::class,
  52. ],
  53. 'controller_start' => [],
  54. 'controller_end' => [],
  55. 'view_start' => [],
  56. 'view_end' => [],
  57. ],
  58. 'apiurl' => API_BASE_URL,
  59. 'database' => [
  60. 'debug' => true,
  61. 'prefix' => '',
  62. 'engine' => 'MyISAM',
  63. 'common' => [
  64. 'driver' => 'mysql',
  65. 'option' => [
  66. 'host' => KX_DB_HOST,
  67. 'port' => KX_DB_PORT,
  68. 'user' => KX_DB_USER,
  69. 'pwd' => KX_DB_PWD,
  70. 'name' => KX_DB_NAME,
  71. ],
  72. ],
  73. ],
  74. //
  75. 'storage' => [
  76. 'runtime' => [
  77. 'driver' => 'file',
  78. 'option' => [
  79. 'path' => KX_ROOT . '/storage/runtime',
  80. ],
  81. ],
  82. 'log' => [
  83. 'driver' => 'file',
  84. 'option' => [
  85. 'path' => KX_ROOT . '/storage/log',
  86. ],
  87. ],
  88. 'template' => [
  89. 'driver' => 'file',
  90. 'option' => [
  91. 'path' => KX_ROOT . '/storage/template',
  92. ],
  93. ],
  94. 'upload' => [
  95. 'driver' => 'file',
  96. 'option' => [
  97. 'path' => KX_ROOT . '/public/upload',
  98. 'url' => '/upload',
  99. ],
  100. ],
  101. 'cover' => [
  102. 'driver' => 'file',
  103. 'option' => [
  104. 'path' => KX_ROOT . '/public/cover',
  105. 'url' => '/cover',
  106. ],
  107. ],
  108. 'txt' => [
  109. 'driver' => 'file',
  110. 'option' => [
  111. 'path' => defined('TXT_PATH') ? TXT_PATH : (KX_ROOT . '/storage/txt'),
  112. ],
  113. ],
  114. ],
  115. //缓存设置
  116. 'cache' => [
  117. 'prefix' => 'kx_',
  118. 'time' => 600,
  119. 'time_s' => 600,
  120. 'time_m' => 600,
  121. 'time_l' => 86200,
  122. 'common' => [
  123. 'driver' => KX_CACHE_COMMON_DRIVER,
  124. 'option' => [
  125. 'prefix' => defined('KX_CACHE_COMMON_PREFIX') ? KX_CACHE_COMMON_PREFIX : 'kx_',
  126. 'host' => defined('KX_CACHE_COMMON_HOST') ? KX_CACHE_COMMON_HOST : '127.0.0.1',
  127. 'port' => defined('KX_CACHE_COMMON_PORT') ? KX_CACHE_COMMON_PORT : '11211',
  128. 'password' => defined('KX_CACHE_COMMON_PASSWORD') ? KX_CACHE_COMMON_PASSWORD : null,
  129. ],
  130. ],
  131. 'chapter' => [
  132. 'driver' => defined('KX_CACHE_CHAPTER_DRIVER') ? KX_CACHE_CHAPTER_DRIVER : 'memcache',
  133. 'option' => [
  134. 'prefix' => defined('KX_CACHE_CHAPTER_PREFIX') ? KX_CACHE_CHAPTER_PREFIX : 'kx_',
  135. 'host' => defined('KX_CACHE_CHAPTER_HOST') ? KX_CACHE_CHAPTER_HOST : '127.0.0.1',
  136. 'port' => defined('KX_CACHE_CHAPTER_PORT') ? KX_CACHE_CHAPTER_PORT : '11211',
  137. 'password' => defined('KX_CACHE_CHAPTER_PASSWORD') ? KX_CACHE_CHAPTER_PASSWORD : null,
  138. ],
  139. ],
  140. ],
  141. //日志设置
  142. 'log' => [
  143. 'power' => true,
  144. 'buildtype' => [ 'kx', 'debug', 'console' ],
  145. ],
  146. // cookie设置
  147. 'coookie' => [
  148. 'prefix' => 'PTCMS_',
  149. // cookie 保存时间
  150. 'expire' => 2592000,
  151. // cookie 保存路径
  152. 'path' => '/',
  153. // cookie 有效域名
  154. 'domain' => '',
  155. // cookie 启用安全传输
  156. 'secure' => false,
  157. // httponly设置
  158. 'httponly' => '',
  159. ],
  160. //session
  161. 'session' => [
  162. 'handler' => '',
  163. 'path' => '',
  164. 'host' => '',
  165. 'port' => '',
  166. ],
  167. 'chapter' => [
  168. 'cache_power' => defined('CHAPTER_CACHE_POWER') ? true : false,
  169. ],
  170. 'novel' => [
  171. 'intro_min_length' => defined('NOVEL_INTRO_MIN_LENGTH') ? NOVEL_INTRO_MIN_LENGTH : '50',
  172. 'intro_max_length' => defined('NOVEL_INTRO_MAX_LENGTH') ? NOVEL_INTRO_MAX_LENGTH : '500',
  173. ],
  174. ];
  175. // TXT_PATH txt保存路径
  176. // COLLECT_MODE 采集模式