Common thinkphp2.2 config. Inc. php configurations

Source: Internet
Author: User

Check_file_case -- strictly check the case in windows.

/* Project Settings */
'App _ debug' => false, // whether to enable the debugging mode
'App _ domain_deploy '=> false, // whether to deploy the project with an independent domain name
'App _ plugin_on '=> false, // whether to enable the plug-in mechanism
'App _ file_case '=> false, // check whether the file is case-sensitive for Windows Platforms
'App _ group_depr '=>'. ', // delimiter between group modules
'App _ group_list '=> '', // project grouping settings. Multiple groups are separated by commas (,), for example, 'home, admin'
'App _ autoload_reg '=> false, // whether to enable spl_autoload_register
'App _ autoload_path '=> 'think. util.', // _ autoload mechanism for additional detection path settings, pay attention to the search order
'App _ config_list '=> array ('taglibs', 'routes', 'tags', 'htmls', 'modules', 'actions '), // The configuration list to be loaded for the project. The default options include taglibs (TAG library definition), routes (route definition), tags (TAG definition), and htmls static cache definition, modules and actions)

/* Cookie settings */
'Cookie _ expire '=> 3600, // coodie Validity Period
'Cookie _ Domain '=> '', // valid cookie Domain Name
'Cookie _ path' => '/', // Cookie Path
'Cookie _ prefix' => '', // avoid conflict with the cookie prefix

/* Default setting */
'Default _ app' => '@', // default project name, @ indicates the current project
'Default _ group' => 'home', // default group
'Default _ module' => 'index', // default Module name
'Default _ action' => 'index', // default operation name
'Default _ charset' => 'utf-8', // default output Encoding
'Default _ timezone '=> 'prc', // Default Time Zone
'Default _ ajax_return '=> 'json', // default Ajax data return format, optional json xml...
'Default _ theme '=> 'default', // default template topic name
'Default _ lang' => 'zh-cn', // default language

/* Database settings */
'Db _ type' => 'mysql', // Database Type
'Db _ host' => 'localhost', // server address
'Db _ name' => '', // Database Name
'Db _ user' => 'root', // User Name
'Db _ pwd' => '', // Password
'Db _ port' => 3306, // Port
'Db _ prefix' => 'think _ ', // database table prefix
'Db _ suffix '=> '', // database table suffix
'Db _ fieldtype_check '=> false, // whether to check the field type
'Db _ fields_cache '=> true, // enable field caching
'Db _ charset' => 'utf8', // The database encoding uses utf8 by default.
'Db _ deploy_type '=> 0, // database deployment method: 0 centralized (Single Server), 1 distributed (Master/Slave server)
'Db _ rw_separate '=> false, // whether the master-slave mode is valid for database read/write splitting

/* Data cache settings */
'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_type '=> 'file', // data cache type, supported: file | dB | APC | memcache | shmop | SQLite | xcache | apachenote | eaccelerator
'Data _ cache_path '=> temp_path, // cache path setting (only valid for File 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

/* Error setting */
'Error _ message' => 'An error occurred temporarily on the page you browsed! Please try again later ~ ', // Error display information, not in debug mode
'Error _ page' => '', // error targeting page

/* Static cache settings */
'Html _ cache_on '=> false, // The static cache is disabled by default.
'Html _ cache_time '=> 60, // static cache Validity Period
'Html _ read_type '=> 0, // static cache read method 0 readfile 1 redirect
'Html _ file_suffix '=> '.shtml', // default static file suffix

/* Language settings */
'Lang _ switch_on '=> false, // The multi-language Package function is disabled by default.
'Lang _ auto_detect '=> true, // the automatic detection language is valid after the multi-language function is enabled.

/* Log settings */
'Log _ record '=> false, // No logs are recorded by default.
'Log _ file_size '=> 2097152, // Log File Size Limit
'Log _ record_level '=> array ('error', 'alert', 'crit', 'err'), // The log level that can be recorded

/* Paging settings */
'Page _ rollpage' => 5, // Number of pages displayed on the page
'Page _ listrows '=> 20, // number of records displayed per page

/* Session settings */
'Session _ auto_start '=> true, // whether to enable the session automatically
// Built-in available session parameters
// 'Session _ name' => '', // session name
// 'Session _ path' => '', // session storage path
// 'Session _ callback' => '', // callback function for Session Object deserialization

/* Set the running time */
'Show _ run_time '=> false, // Run Time Display
'Show _ adv_time' => false, // displays the detailed running time.
'Show _ db_times '=> false, // displays the number of database queries and writes.
'Show _ cache_times '=> false, // displays the number of cache operations
'Show _ use_mem '=> false, // Display memory overhead
'Show _ page_trace '=> false, // The trace information of the displayed page is defined by the trace file and assigned values for action operations.
'Show _ error_msg '=> true, // the error message is displayed.

/* Template engine settings */
'Tmpl _ engine_type '=> 'think', // The default template engine. The following settings are only valid for the think template engine.
'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 _ deny_func_list '=> 'echo, exit', // The template engine disables the function.
'Tmpl _ parse_string '=> '', // the string to be automatically replaced by the template engine, which must be an array.
'Tmpl _ l_delim '=>' {', // template engine common tag start tag
'Tmpl _ r_delim '=>'} ', // template engine common tag end tag
'Tmpl _ var_identify '=> 'array', // template variable identification. If this parameter is left blank, it is automatically judged. If the parameter is 'obj ', it indicates the object.
'Tmpl _ strip_space '=> false, // whether to remove HTML spaces and line breaks in the template file
'Tmpl _ cache_on '=> true, // whether to enable template compilation cache. If it is set to false, the template will be re-compiled every time.
'Tmpl _ cache_time '=>-1, // The template cache validity period-1 is permanent (in numbers, unit: seconds)
'Tmpl _ action_error '=> 'public: Success', // default error jumps to the corresponding Template File
'Tmpl _ action_success '=> 'public: Success', // The template file is successfully redirected by default.
'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 _ file_depr' => '/', // delimiter between module_name and action_name in the template file, which is only valid for Project Group deployment.
// Think template engine tag library settings
'Taglib _ begin' => '<', // tag library Label Start marking
'Taglib _ end' => ', // tag end tag of the tag Library
'Taglib _ load' => true, // whether to use a tag library other than the built-in tag library. It is automatically detected by default.
'Taglib _ build_in '=> 'cx', // The name of the built-in tag Library (tag names are separated by commas (,).
'Taglib _ pre_load '=> '', // The tag library to be loaded (the name of the tag library must be specified), separated by commas
'Tag _ nested_level '=> 3, // tag nesting level
'Tag _ extend_parse '=> '', // specify the name of the function that extends the definition and resolves the common tag.

/* Form token verification */
'Token _ on' => true, // enable token Verification
'Token _ name' => '_ Hash _', // name of the hidden field in the form for token Verification
'Token _ type' => 'md5', // token verification hash rule

/* URL setting */
'Url _ case_insensitive '=> false, // whether the URL address is case insensitive
'Url _ router_on '=> false, // whether to enable URL Routing
'Url _ dispatch_on '=> true, // whether to enable dispatcher
'Url _ model' => 1, // URL access mode. Optional parameters: 0, 1, 2, and 3, which represent the following four modes:
// 0 (normal mode); 1 (pathinfo mode); 2 (rewrite mode); 3 (compatible mode): valid when url_dispatch_on is enabled; pathinfo mode is used by default, provide the best user experience and Seo support
'Url _ pathinfo_model '=> 2, // pathinfo mode. numbers 1, 2, and 3 represent the following three modes:
// 1 normal mode (parameters have no order, for example,/M/module/A/Action/ID/1 );
// 2 intelligent mode (the default mode used by the system, which can automatically identify the module and operation/module/Action/ID/1 // or/module, action, ID, 1 /...);
// 3 compatibility mode (pass pathinfo to dispather through a get variable. The default value is s index. php? S =/module/Action/ID/1)
'Url _ pathinfo_depr '=>'/', // The delimiter between parameters in pathinfo mode.
'Url _ html_suffix '=> '', // URL pseudo-static suffix settings

/* Set the system variable name */
'Var _ group' => 'G', // get the variable by default group
'Var _ module' => 'M', // The default module obtains the variable.
'Var _ action' => 'A', // get the variable by default
'Var _ router '=> 'R', // obtain the variable from the default route
'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
'Var _ pathinfo' =>'s ', // obtain the variable in the pathinfo compatibility mode, for example? The parameters after S =/module/Action/ID/1 depend on url_pathinfo_model and url_pathinfo_depr.

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.