THINKPHP config. php configuration problems

Source: Internet
Author: User

ThinkPHP config. php detailed configuration file Introduction
THINKPHP config. php configuration problems

<? Php

Return array (
// Configure //---------------------------------------------------------------------------------------
// Template Configuration
// Configure //---------------------------------------------------------------------------------------
"TMPL_DETECT_THEME" => false, // automatically detects the template topic
"TMPL_TEMPLATE_SUFFIX" => '.html ', // default template file suffix
"TMPL_CACHFILE_SUFFIX" => '. php', // default template cache suffix
"TMPL_PARSE_STRING" => '', // the string to be automatically replaced by the template engine, which must be an array. For example, array ('_ MYPATH _' => Lib_PATH ,...)
"TMPL_ACTION_ERROR" => 'public: error', // error jump Template File
"TMPL_ACTION_SUCCESS" => 'public: success ', // The template file is successfully redirected.
"TMPL_TRACE_FILE" => THINK_PATH. '/Tpl/PageTrace. tpl. php', // template file of page Trace
"TMPL_EXCEPTION_FILE" => THINK_PATH. '/Tpl/ThinkException. tpl. php', // template file of the exception page
"TMPL_ENGINE_TYPE" => 'think', // default template engine
// The following settings are only valid for the Think template engine.
"TMPL_DENY_FUNC_LIST" => 'echo, exit ', // The function is disabled by the template engine.
"TMPL_L_DELIM" => '{', // template engine common tag start tag
"TMPL_R_DELIM" => '}', // template engine common tag end tag
"TMPL_VAR_IDENTIFY" => 'array', // The template variable identification is left empty and can be used to identify the array obj object.
"TMPL_FILE_DEPR" => '/', // delimiter between the template file MODULE_NAME and ACTION_NAME, which is only valid for Project Group deployment.
"TMPL_STRIP_SPACE" => false, // whether to remove html spaces in the template file without line breaks
"TMPL_CACHE_ON" => true, // If template compilation cache is enabled by default, the template will be re-compiled every time.
"TMPL_CACHE_TIME" =>-1, // template cache validity period-1 permanent unit: seconds
"TAGLIB_BEGIN" => '<', // tag library tag start marking
"TAGLIB_END" => ', // tag end tag of the tag Library
"TAGLIB_BUILD_IN" => 'cx ', // The name of the built-in tag library can be added to its own tag library. Multiple tags are separated by commas.
"TAGLIB_PRE_LOAD" => '', // pre-loaded tag library. You do not need to use the taglib tag to load each template. Separate multiple tags with commas (,).
"TAG_NESTED_LEVEL" => 3 // tag nesting level

// Configure //---------------------------------------------------------------------------------------
// Application configuration
// Configure //---------------------------------------------------------------------------------------
"APP_GROUP_DEPR" => '.', // delimiter used between group modules.
"APP_GROUP_LIST" => '', // list of project module groups. Separate multiple groups with commas (,), for example, 'admin, home'
"APP_CONFIG_LIST" => array ('taglibs', 'routes ', 'tags', 'htmls', 'modules', 'actions'), // list of Project Extension Configuration Files
"APP_DOMAIN_DEPLOY" => false, // whether to use an independent domain name to deploy the project. It is enabled only when the project directory is the root directory of the website.

// Configure //---------------------------------------------------------------------------------------
// URL Configuration
// Configure //---------------------------------------------------------------------------------------
"URL_MODEL" => 1, // URL mode: 0 Normal Mode 1 PATHINFO 2 REWRITE 3 compatibility mode valid when URL_DISPATCH_ON is enabled
// PATHINFO mode by default, providing the best user experience and SEO support

"URL_PATHINFO_MODEL" => 2, // PATHINFO mode. The smart mode is used by default.
// Normal Mode 1 parameter no order/m/module/a/action/id/1
// Intelligent mode 2 brake Identification module and operation/module/action/id/1 // module, action, id, 1 /...

"URL_PATHINFO_DEPR" => '/', // The delimiter between PATHINFO parameters.
"URL_ROUTER_ON" => true, // whether to enable URL Routing
"URL_HTML_SUFFIX" => '. av', // set the pseudo-static suffix, for example,. shtml
"URL_CASE_INSENSITIVE" => false, // whether the URL is case insensitive. The default value is case sensitive.


// Configure //---------------------------------------------------------------------------------------
// Log Configuration
// Configure //---------------------------------------------------------------------------------------
"LOG_RECORD" => false, // indicates whether to record website logs. logs are not recorded by default.
"LOG_RECORD_LEVEL" => array ('emerg ', 'alert', 'crit', 'err'), // The log level that can be recorded
"LOG_FILE_SIZE" => 2097152, // log file size limit. If the log record for the file method is exceeded, a backup file is automatically generated.


// Configure //---------------------------------------------------------------------------------------
// Incorrect Configuration
// Configure //---------------------------------------------------------------------------------------
"ERROR_MESSAGE" => 'An error occurred temporarily on the page you browsed! Please try again later ~ ', // The error display information is not valid in debug mode.
"ERROR_PAGE" => '', // error targeting page, you need to fill in the complete URL address


// Configure //---------------------------------------------------------------------------------------
// Database Configuration
// Configure //---------------------------------------------------------------------------------------
"DB_CHARSET" => 'utf8', // database encoding. utf8 is used by default.
"DB_DEPLOY_TYPE" => 0, // database deployment method: 0 centralized (single friend server) 1 distributed (Master/Slave friend server)
"DB_RW_SEPARATE" => false, // whether the read/write operations of the database are separated. this parameter is valid in the distributed database mode.
"DB_FIELDS_CACHE" => true, // enable data table field caching
"DB_TYPE" => 'mysql', // Database Type
"DB_HOST" => 'localhost', // database server address
"DB_NAME" => '', // Database Name
"DB_USER" => 'root', // database username
"DB_PWD" => '', // Database Password
"DB_PORT" => 3306, // port used by the database
"DB_PREFIX" => 'think _ ', // database region table prefix
"DB_SUFFIX" => '', // database table suffix
"DB_FIELDTYPE_CHECK" => false, // check whether the field type of the deleted row is checked.


// Configure //---------------------------------------------------------------------------------------
// Static cache Configuration
// Configure //---------------------------------------------------------------------------------------
"HTML_FILE_SUFFIX" => '.shtml ', // default static file suffix
"HTML_CACHE_ON" => false, // The static cache is disabled by default.
"HTML_CACHE_TIME" => 60, // static cache Validity Period
"HTML_READ_TYPE" => 1, // static cache read mode 0 readfile 1 redirect


// Configure //---------------------------------------------------------------------------------------
// Data cache Configuration
// Configure //---------------------------------------------------------------------------------------
"DATA_CACHE_TYPE" => 'file', // The data cache type supports File Db Apc Memcache Shmop Sqlite Xcache Apachenote Eaccelerator.
"DATA_CACHE_PATH" => TEMP_PATH // cache path setting (only valid for File Cache)
"DATA_CACHE_TIME" =>-1, // data cache Validity Period
"DATA_CACHE_COMPRESS" => false, // whether the data cache compresses the cache
"DATA_CACHE_CHECK" => false, // whether the data cache verifies the cache
"DATA_CACHE_SUBDIR" => false, // use sub-directory cache (automatically create sub-directories Based on the hash of the cache ID)
"DATA_PATH_LEVEL" => 1, // sub-directory cache level


// Configure //---------------------------------------------------------------------------------------
// Run time Configuration
// Configure //---------------------------------------------------------------------------------------
"SHOW_RUN_TIME" => false, // display the running time
"SHOW_ADV_TIME" => false, // display detailed runtime intervals, valid after SHOW_RUN_TIME is enabled
"SHOW_DB_TIMES" => false, // displays the number of database reads and writes.
"SHOW_CACHE_TIMES" => false, // displays the cache read/write count.
"SHOW_USE_MEM" => false, // Display memory overhead
"SHOW_PAGE_TRACE" => false, // display the page Trace information, which is defined by the Trace file and assigned a value for Action operations.
"SHOW_ERROR_MSG" => true, // error message displayed when an error occurs


// Configure //---------------------------------------------------------------------------------------
// Cookie settings
// Configure //---------------------------------------------------------------------------------------
"COOKIE_EXPIRE" => 3600, // Coodie Validity Period
"COOKIE_DOMAIN" => '', // valid Cookie Domain Name
"COOKIE_PATH" => '/', // Cookie Path
"COOKIE_PREFIX" => '', // avoid conflict with Cookie prefix


// Configure //---------------------------------------------------------------------------------------
// Token verification Configuration
// Configure //---------------------------------------------------------------------------------------
"TOKEN_ON" => true, // whether to enable token Verification
"TOKEN_NAME" => '_ hash _', // name of the hidden field in the form for token Verification
"TOKEN_TYPE" => 'md5', // token verification hash rule


// Configure //---------------------------------------------------------------------------------------
// Default Configuration
// Configure //---------------------------------------------------------------------------------------
"DEFAULT_APP" => '@', // The Name Of The project where the default model class is located @ indicates the current project
"DEFAULT_GROUP" => 'home', // default group
"DEFAULT_MODULE" => 'index', // default Module name
"DEFAULT_ACTION" => 'index', // default operation name
"DEFAULT_THEME" => 'default', // default template topic name
"DEFAULT_LANG" => 'zh-cn', // default language
"DEFAULT_TIMEZONE" => 'prc', // Default Time Zone
"DEFAULT_AJAX_RETURN" => 'json', // json xml format returned by AJAX data...
"DEFAULT_CHARSET" => 'utf-8', // default page output code


// Configure //---------------------------------------------------------------------------------------
// System variable configuration
// Configure //---------------------------------------------------------------------------------------
// The following Variable configurations are mainly used for special URL values. do not conflict with URL and form parameters in the project; otherwise, errors may occur.
"VAR_PATHINFO" =>'s, // obtain the variable in the PATHINFO compatibility mode, for example? S =/module/action/id/1
"VAR_GROUP" => 'G', // default group sending volume
"VAR_ROUTE" => 'R', // get the variable from the default route
"VAR_MODULE" => 'M', // The default module obtains the variable.
"VAR_ACTION" => 'A', // get the variable by default.
"VAR_PAGE" => 'P', // default paging jump variable
"VAR_TEMPLATE" => 'T', // default template switch variable
"VAR_LANGUAGE" => 'l', // default language switch variable
"VAR_AJAX_SUBMIT" => 'ajax ', // default ajax submission variable


// Configure //---------------------------------------------------------------------------------------
// Language and Time Zone
// Configure //---------------------------------------------------------------------------------------
"LANG_SWITCH_ON" => false // whether to enable the multi-language function. It is disabled by default.

);
?>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.