convention.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. // +--------------------------------------------------------------------------
  3. // | Senthot [ DEVELOPED BY ME ]
  4. // +--------------------------------------------------------------------------
  5. // | Copyright (c) 2005-2013 http://www.senthot.com All rights reserved.
  6. // | License ( http://www.apache.org/licenses/LICENSE-2.0 )
  7. // | Author: ms134n ( [email protected] )
  8. // +--------------------------------------------------------------------------
  9. /**
  10. * Senthot practice profile
  11. * Please do not modify the file , if you want to overwrite the configured value convention , the configuration file in the project settings and practices inconsistent configuration items
  12. * Case of arbitrary configuration name , the system will unify converted to lowercase
  13. * All configuration parameters can be dynamically changed before the commencement
  14. * @category Sen
  15. * @package Common
  16. * @author ms134n <[email protected]>
  17. * @version $Id: convention.php 3088 2012-07-29 09:12:19Z [email protected] $
  18. */
  19. defined('SEN_PATH') or exit();
  20. return array(
  21. /* Item Settings */
  22. 'APP_STATUS' => 'debug', // Application debugging mode status Debug mode is turned on effective The default is debug Scalable And automatically loads the corresponding configuration file
  23. 'APP_FILE_CASE' => false, // Whether to check the case file Valid for Windows platforms
  24. 'APP_AUTOLOAD_PATH' => '',// Automatic loading mechanism of automatic path search, Note that the search order
  25. 'APP_TAGS_ON' => true, // System tab expansion switch
  26. 'APP_SUB_DOMAIN_DEPLOY' => false, // Whether to open the sub-domain deployment
  27. 'APP_SUB_DOMAIN_RULES' => array(), // Subdomain deployment rules
  28. 'APP_SUB_DOMAIN_DENY' => array(), // Subdomain disabled list
  29. 'APP_GROUP_LIST' => '', // Project grouping setting, Multiple groups with commas,For example,'Home,Admin'
  30. 'APP_GROUP_MODE' => 0, // Packet Mode 0 General Packet 1 Independent groups
  31. 'APP_GROUP_PATH' => 'Modules', // Grouping directory Independent groupsMode following effective
  32. 'ACTION_SUFFIX' => '', // Operation suffix
  33. /* Cookie settings */
  34. 'COOKIE_EXPIRE' => 0, // Cookie validity
  35. 'COOKIE_DOMAIN' => '', // Cookie valid domain name
  36. 'COOKIE_PATH' => '/', // Cookie Path
  37. 'COOKIE_PREFIX' => '', // Cookie prefix Avoid conflicts
  38. /* Default setting */
  39. 'DEFAULT_M_LAYER' => 'Model', // Default name of the model layer
  40. 'DEFAULT_C_LAYER' => 'Action', // Default controller layer name
  41. 'DEFAULT_APP' => '@', // Default project name, @ indicates that the current project
  42. 'DEFAULT_LANG' => 'id-id', // Default language
  43. 'DEFAULT_THEME' => '', // Default template Subject Name
  44. 'DEFAULT_GROUP' => 'Home', // Default grouping
  45. 'DEFAULT_MODULE' => 'Index', // Default module name
  46. 'DEFAULT_ACTION' => 'index', // Default operation name
  47. 'DEFAULT_CHARSET' => 'utf-8', // Default output encoding
  48. 'DEFAULT_TIMEZONE' => 'PRC', // Default time zone
  49. 'DEFAULT_AJAX_RETURN' => 'JSON', // Default AJAX Return data format, Optional JSON XML ...
  50. 'DEFAULT_JSONP_HANDLER' => 'jsonpReturn', // The default format returned JSONP approach
  51. 'DEFAULT_FILTER' => 'htmlspecialchars', // Default parameter filtering methods Use for $this->_get('Variable name');$this->_post('Variable name')...
  52. /* Database Settings */
  53. 'DB_TYPE' => 'mysql', // Database Type
  54. 'DB_HOST' => 'localhost', // Server Address
  55. 'DB_NAME' => '', // Database name
  56. 'DB_USER' => 'root', // Username
  57. 'DB_PWD' => '', // Password
  58. 'DB_PORT' => '', // Port
  59. 'DB_PREFIX' => 'sen_', // Database table prefix
  60. 'DB_FIELDTYPE_CHECK' => false, // Checking whether a field type
  61. 'DB_FIELDS_CACHE' => true, // Enabling field cache
  62. 'DB_CHARSET' => 'utf8', // Database encoding defaults to utf8
  63. 'DB_DEPLOY_TYPE' => 0, // Database deployment:0 Centralized(Single Server), 1 Distributed(Master-slave server)
  64. 'DB_RW_SEPARATE' => false, // Whether separate database literacy Master-slave effective
  65. 'DB_MASTER_NUM' => 1, // Read and write after separation Number of master server
  66. 'DB_SLAVE_NO' => '', // Specifies the Server serial number
  67. 'DB_SQL_BUILD_CACHE' => false, // Create a SQL database query cache
  68. 'DB_SQL_BUILD_QUEUE' => 'file', // SQL cache buffer queue mode Support file xcache and apc
  69. 'DB_SQL_BUILD_LENGTH' => 20, // SQL cache queue length
  70. 'DB_SQL_LOG' => false, // SQL execution logging
  71. /* Data cache settings */
  72. 'DATA_CACHE_TIME' => 0, // Valid data cache 0 indicates persistent cache
  73. 'DATA_CACHE_COMPRESS' => false, // Whether to compress data buffer cache
  74. 'DATA_CACHE_CHECK' => false, // Whether parity cache data cache
  75. 'DATA_CACHE_PREFIX' => '', // Cache prefix
  76. 'DATA_CACHE_TYPE' => 'File', // Data cache type, support:File|Db|Apc|Memcache|Shmop|Sqlite|Xcache|Apachenote|Eaccelerator
  77. 'DATA_CACHE_PATH' => TEMP_PATH,// Cache path settings (File caching is only effective way)
  78. 'DATA_CACHE_SUBDIR' => false, // Using cache subdirectory (Automatically creates a subdirectory cache hash mark)
  79. 'DATA_PATH_LEVEL' => 1, // Subdirectory cache levels
  80. /* Incorrect settings */
  81. 'ERROR_MESSAGE' => 'Page Error ! Please try again later ~',//Error display information, Non-debug mode is active
  82. 'ERROR_PAGE' => '', // Misdirected page
  83. 'SHOW_ERROR_MSG' => false, // Display an error message
  84. 'TRACE_EXCEPTION' => false, // TRACE is throwing an exception error message Methods for trace
  85. /* Log Settings */
  86. 'LOG_RECORD' => false, // Default log does not record
  87. 'LOG_TYPE' => 3, // Logging Type 0 System 1 Mail 3 File 4 SAPI The default mode for the file
  88. 'LOG_DEST' => '', // Logging Target
  89. 'LOG_EXTRA' => '', // Logging additional information
  90. 'LOG_LEVEL' => 'EMERG,ALERT,CRIT,ERR',// Allows you to record the log level
  91. 'LOG_FILE_SIZE' => 2097152, // Log file size limit
  92. 'LOG_EXCEPTION_RECORD' => false, // Whether to log exception information log
  93. /* SESSION settings */
  94. 'SESSION_AUTO_START' => true, // Whether to automatically open Session
  95. 'SESSION_OPTIONS' => array(), // session Configuration Array Supporttype name id path expire domian And other parameters
  96. 'SESSION_TYPE' => '', // session hander type No need to set the default Unless extended session hander Drive
  97. 'SESSION_PREFIX' => '', // session Prefix
  98. //'VAR_SESSION_ID' => 'session_id', //Submission of variable sessionID
  99. /* Template engine settings */
  100. 'TMPL_CONTENT_TYPE' => 'text/html', // Default Template Output Type
  101. 'TMPL_ACTION_ERROR' => SEN_PATH.'Tpl/dispatch_jump.tpl', // Jump corresponding default error template file
  102. 'TMPL_ACTION_SUCCESS' => SEN_PATH.'Tpl/dispatch_jump.tpl', // Successful jumps corresponding default template file
  103. 'TMPL_EXCEPTION_FILE' => SEN_PATH.'Tpl/sen_exception.tpl',// Exception page template file
  104. 'TMPL_DETECT_THEME' => false, // Automatically detects the template theme
  105. 'TMPL_TEMPLATE_SUFFIX' => '.html', // The default template file suffix
  106. 'TMPL_FILE_DEPR' => '/', //MODULE_NAME and ACTION_NAME template file delimiters between
  107. /* URL setting */
  108. 'URL_CASE_INSENSITIVE' => false, // Default false indicates that the URL is case sensitive true indicates a case-insensitive
  109. 'URL_MODEL' => 1, // URL access mode, optional parameters 0,1,2,3, represent the following four modes:
  110. // 0 (Normal mode); 1 (PATHINFO Mode); 2 (REWRITE Mode); 3 (Compatibility Mode) The default is PATHINFO Mode, provide the best user experience and SEOSupport
  111. 'URL_PATHINFO_DEPR' => '/', // PATHINFOMode , the division among the parameters symbols
  112. 'URL_PATHINFO_FETCH' => 'ORIG_PATH_INFO,REDIRECT_PATH_INFO,REDIRECT_URL', // Use for compatible judge PATH_INFO SERVER parameter substitution variables list
  113. 'URL_HTML_SUFFIX' => '', // URL suffix settings pseudo-static
  114. 'URL_PARAMS_BIND' => true, // URL variables bound to the Action method parameters
  115. 'URL_404_REDIRECT' => '', // 404 Jump page Effective Deployment Mode
  116. /* System variable name setting */
  117. 'VAR_GROUP' => 'g', // Default grouping get variable
  118. 'VAR_MODULE' => 'm', // Default module for variable
  119. 'VAR_ACTION' => 'a', // Default action for the variable
  120. 'VAR_AJAX_SUBMIT' => 'ajax', // The default AJAX submit variables
  121. 'VAR_JSONP_HANDLER' => 'callback',
  122. 'VAR_PATHINFO' => 's', // PATHINFO Compatibility Mode Gets variables such as ?s=/module/action/id/1 Subsequent parameters depend URL_PATHINFO_DEPR
  123. 'VAR_URL_PARAMS' => '_URL_', // PATHINFO URL parameter variables
  124. 'VAR_TEMPLATE' => 't', // The default template switching variable
  125. 'VAR_FILTERS' => 'filter_exp', // Global System variables default filtering method Multiple comma-separated
  126. 'OUTPUT_ENCODE' => true, // Page compressed output
  127. 'HTTP_CACHE_CONTROL' => 'private', // Web Cache Control
  128. );