thinkphp system has a custom profile (conf\convention.php under the system directory) built on the default configuration of commonly used parameters, in most cases. In this paper, the Convention configuration file is commented in detail as follows, for your reference:
<?php/** +------------------------------------------------------------------------------* thinkphp Convention profile * Do not modify this file, if you want to overwrite the values of the Convention configuration, you can set and practice inconsistent configuration item * Configuration name in the project configuration file is arbitrary, the system will be converted to lowercase * All configuration parameters can be dynamically changed before it takes effect +----------------------------- -------------------------------------------------* @category @package Common * @version $Id $ +-----------------
-------------------------------------------------------------*/if (!defined (' Think_path ')) exit (); return Array (/* Project SET/* app_debug ' => false,//whether to open debug mode ' App_domain_deploy ' => false,//whether to use a stand-alone Domain name deployment project ' App_ Plugin_on ' => false,//whether to open the plugin mechanism ' app_file_case ' => false,//check that file capitalization is valid for Windows platform ' APP_GROUP_DEPR ' => '. ',///module groupings between the separator ' app_group_list ' => ',//project group settings, multiple groups separated by commas, such as ' home,admin ' App_autoload_reg ' => False,//whether to open spl_autoload_register ' App_autoload_path ' => ' think.util. ',//__autoload mechanism additional detection path settings, note search order ' App_confi G_list ' => Array (' taglibs ', ' routes ', ' tags ', ' htmls ', ' moduleS ', ' actions '),//project additional needs to load the configuration list, default includes: taglibs (tag library definition), routes (routing definition), tags (label definition), (htmls) static cache definition, modules (Extension module), Actions ( Extended Operation * * Cookie set/' Cookie_expire ' => 3600,//Coodie validity ' cookie_domain ' => ',///cookie valid domain name ' cookie_ Path ' => '/',//cookie path ' cookie_prefix ' => ',//cookie prefix avoidance conflict/* default setting/' Default_app ' => ' @ ',//default project name, @ indicates current project ' Default_group ' => ' home ',//default group ' Default_module ' => ' Index ',//default module name ' Default_a
Ction ' => ' index ',//default operation name ' Default_charset ' => ' utf-8 ',///Default output code ' default_timezone ' => ' PRC ',//default time zone
' Default_ajax_return ' => ' json ',//default AJAX data return format, optional JSON XML ... ' Default_theme ' => ' defaults ',//default template subject 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 ',//username ' db_pwd ' => ',//password ' db_port ' => 3306,//Port ' db_prefix ' => ' think_ ',//database table prefix ' db_suffix ' => ',//database table suffix ' db_fieldtype_check ' = > False,//whether field type checking ' Db_fields_cache ' => true,//enable field cache ' Db_charset ' => ' UTF8 ',//Database encoding defaults to u Tf8 ' Db_deploy_type ' => 0,//Database Deployment mode: 0 Centralized (single server), 1 distributed (Master-slave server) ' Db_rw_separate ' => false,//database read/write separation master/slave/data cache Settings/' Data_cache_time ' =>-1, Data cache validity ' data_cache_compress ' => false,//data cache Compressed cache ' Data_cache_check ' => false,//data cache checksum cache ' Data_cach E_type ' => ' File,//data cache type, support: file| db| apc| memcache| shmop| sqlite| xcache| apachenote| Eaccelerator ' Data_cache_path ' => temp_path,//cache path Settings (valid only for file caching) ' Data_cache_subdir ' => false,//using subdirectory caching ( automatically creates a subdirectory based on the hash of the cached identity) ' Data_path_level ' => 1,//subdirectory cache level/* Error setting/' Error_message ' => ' Your browsing page has been temporarily wrong! Please try again later ~ ',//error display information, non-debug mode valid ' Error_page ' => ',//Error oriented page/static cache setting/' html_cache_on ' => false,//default shutdown static cache ' Html_ Cache_time ' => 60, Static cache lifetime ' Html_read_type ' => 0,//static cache read mode 0 ReadFile 1 redirect ' Html_file_suffix ' => '. shtml ',//default static
state file suffix/* language setting/' lang_switch_on ' => false,///default Turn off MultiLanguage Pack function ' Lang_auto_detect ' => true,//Automatically detect language to open multi-language function effective /* Log set/' Log_record ' => false,///default does not log ' log_file_size ' => 2097152,//log file size limit ' log_record_level ' => Array (' Emerg ', ' ALERT ', ' crit ', ' ERR '),//log level allowed logging/* Paging settings/' Page_rollpage ' => 5,//page display pages ' Page_listrows ' => 20,//pagination display number per page/* Session setting/' Session_auto_start ' => true,//whether automatically open session//built-in session class available parameters//' S Ession_name ' => ',//Session name//' Session_path ' => ',//Session save path//' Session_callback ' => ', callback function for Session object deserialization/* Run time setting/' Show_run_time ' => false,//Run time display ' Show_adv_time ' => false,//show detailed Run time ' show_db_times ' => false,//Show database query and write count ' Show_cache_times ' => false,//show cache operations ' Show_use_mem ' => FA LSE,//Show memory overhead ' SHOW_PAGe_trace ' => false,//Show page trace information assigned by trace file definition and action action ' show_error_msg ' => true,//Display error message//template engine Settings * * * TM Pl_engine_type ' => ',///default template engine The following settings are valid only for use of the "a"/"*" template engine ' Tmpl_detect_theme ' => false,//Automatically detect template theme ' Tmpl_te Mplate_suffix ' => '. html ',//default template file suffix ' tmpl_cachfile_suffix ' => '. php ',//default template cache suffix ' tmpl_deny_func_list ' =>
' Echo,exit ',//template engine disables function ' tmpl_parse_string ' => ',//template engine to automatically replace string, must be array form. ' Tmpl_l_delim ' => ' {',//template engine normal label start tag ' Tmpl_r_delim ' => '} ',//template engine normal tag end tag ' tmpl_var_identify ' => ' Array ',//template variable identification. Leave blank automatically to judge, the parameter is ' obj ' to indicate the object ' Tmpl_strip_space ' => false,//whether to remove the HTML space inside the template file and the newline ' tmpl_cache_on ' => true,//whether to open the die The Board compilation cache, set to False, will recompile ' Tmpl_cache_time ' =>-1 each time,//the template cache validity period-1 is permanent, (in numeric value, in seconds) ' Tmpl_action_error ' => ' public : Success ',///Default error jump corresponding template file ' tmpl_action_success ' => ' public:success ',////default successful jump corresponding template file ' Tmpl_trace_file ' => THI Nk_path. ' /tpl/pagetrace.tpl.php ',//page trace template file ' Tmpl_exception_file ' => think_path. ' /tpl/thinkexception.tpl.php ',//Exception page template file ' Tmpl_file_depr ' => '/',//template file Module_name and action_name between the delimiters,
Deploy only valid//I-I-i-template engine tag library related settings ' taglib_begin ' => ' < ',//tag library tag start tag ' taglib_end ' => ' > ',//tag library tag end tag ' Taglib_load ' => true,//whether to use a tag library other than the built-in tag library, automatically detect ' taglib_build_in ' => ' cx ' by default,//built-in tag library name (tag use does not need to specify a tag library name), separated by a comma Separate ' taglib_pre_load ' => ',//need additional load tag library (must specify tag library name), multiple comma-delimited ' tag_nested_level ' => 3,//Label nesting level ' Tag_extend_pars
E ' => ',//Specifies the name of the function that extends the definition and resolution of the normal label. /* Form Token verification */' token_on ' => true,//Open token verification ' token_name ' => ' __hash__ ',//token-verified form hidden field name ' Token_ TYPE ' => ' MD5 ',//token verification hash rule/* URL setting/' Url_case_insensitive ' => false,//URL address is case-insensitive ' url_router_on ' => false,//whether to open URL route ' url_dispatch_on ' => true,//whether to enable dispatcher ' Url_model ' => 1,//URL access mode, can Selected parameters 0, 1, 2, 3, representing the following four modes://0 (normal mode); 1 (pathinfo mode); 2 (REWRITE mode); 3 (compatible mode) when the url_dispatch_on is open and effective; The default is PathInfo mode, providing the best user experience and SEO support for the ' Url_pathinfo_model ' => 2,//PathInfo mode, using the numbers 1, 2, and 3 to represent the following three modes://1 Normal mode (parameters are not sequential, for example,/m/m
ODULE/A/ACTION/ID/1);
2 Intelligent mode (the system defaults to use the mode, can automatically identify modules and operations/module/action/id/1/or/module,action,id,1/...); 3 compatibility Mode (pass PathInfo to Dispather via a Get variable, default to S index.php?s=/module/action/id/1) ' Url_pathinfo_depr ' => '/',// PathInfo mode, the split between the parameters ' Url_html_suffix ' => ',//URL pseudo-static suffix set/* system variable Name set * * * * var_group ' => ' g ',//default group Gets the variable ' var_module ' => ' m ',///The default module gets the variable ' var_action ' => ' a ',//The default action gets the variable ' var_router ' => ' r ',// Default route get variable ' var_page ' => ' P ',//default paging Hop transition ' var_template ' => ' t ',//default template toggle variable ' var_language ' => ' l ' ,//default language switching variable ' var_ajax_submit ' => ' ajax ',///default AJAX submission variable ' var_pathinfo ' => ',//pathinfo compatibility mode fetch variable for example? s=/ The parameters behind the MODULE/ACTION/ID/1 depend on the Url_pathinfo_model and URL_PATHINFO_DEPR);
In addition, it is also noted that due to changes in the new system architecture, some of the custom configuration parameters have been separated into the attribute parameter for behavioral extensions, and readers can consult the manual for further information.