thinkphp config.php Configuration Issues _php Tutorial

Source: Internet
Author: User
thinkphp config.php Detailed configuration file introduction
Configuration issues for thinkphp config.php

Return Array (
//---------------------------------------------------------------------------------------
Template configuration
//---------------------------------------------------------------------------------------
"Tmpl_detect_theme" = False,//auto-detect template Theme
"Tmpl_template_suffix" = ". html",//default template file suffix
"Tmpl_cachfile_suffix" = '. php ',//default template cache suffix
The string "tmpl_parse_string" and "=",//template engine to be replaced automatically, must be in the form of an array. For example, array (' __mypath__ ' =>lib_path,...)
"Tmpl_action_error" = ' public:error ',//error jump template file
"Tmpl_action_success" = ' public:success ',//Success Jump template file
"Tmpl_trace_file" =>think_path. ' /tpl/pagetrace.tpl.php ',//page trace template file
"Tmpl_exception_file" =>think_path. ' /tpl/thinkexception.tpl.php ',//exception page template file
"Tmpl_engine_type" = ' Think ',//default template engine
The following settings are only valid for use with the Think template engine
"Tmpl_deny_func_list" = ' echo,exit ',//template engine disable function
"Tmpl_l_delim" = ' {',//template engine normal tag start tag
"Tmpl_r_delim" + '} ',//template engine plain tag end tag
"Tmpl_var_identify" = ' array ',//template variable recognition empty self-judgment array Array obj object
"Tmpl_file_depr" = '/',//template file Module_name not action_name, only valid for Project grouping deployment
"Tmpl_strip_space" =>false,//whether to remove the HTML space inside the template file does not break the line
"Tmpl_cache_on" =>true,//default open template compilation cache False to recompile the template every time
"Tmpl_cache_time" = 1,//template cache validity period-1 permanent units in seconds
"Taglib_begin" = ' < ',//tag library tag start tag
"Taglib_end" = ' > ',//tag library tag end tag
"taglib_build_in" + ' cx ',//built-in tag library name can add your own tag library, multiple use comma separated
"Taglib_pre_load" = "+",//Pre-loaded tag library, no need to load in each template using TAGLIB tag, multiple separated by commas
"Tag_nested_level" =>3//Tag nesting level

//---------------------------------------------------------------------------------------
Application Configuration
//---------------------------------------------------------------------------------------
"App_group_depr" = ".",//divider between module groupings
"App_group_list" = "+",//Project block list, multiple groups separated by commas enlightened, for example ' Admin,home '
"App_config_list" =>array (' taglibs ', ' routes ', ' tags ', ' htmls ', ' modules ', ' actions '),//Project Extension profile list
"App_domain_deploy" =>false,//whether to use a standalone Domain name deployment project, only if the project directory itself is the site root directory is opened

//---------------------------------------------------------------------------------------
URL configuration
//---------------------------------------------------------------------------------------
"Url_model" =>1,//url mode: 0 Normal mode 1 PATHINFO 2 REWRITE 3 compatibility mode effective when url_dispatch_on is turned on
Default to PathInfo mode, providing the best user experience and SEO support

"Url_pathinfo_model" =>2,//pathinfo mode, using smart mode by default
Normal Mode 1 parameter has no order/M/MODULE/A/ACTION/ID/1
Intelligent Mode 2 Brake identification module and operation/module/action/id/1/or/module,action,id,1/...

"Url_pathinfo_depr" = '/',//pathinfo between parameters
"Url_router_on" =>true,//whether to turn on URL routing
"Url_html_suffix" = '. av ',//pseudo static suffix settings, for example. shtml
"Url_case_insensitive" =>false,//url is case-insensitive, default-sensitive


//---------------------------------------------------------------------------------------
Log configuration
//---------------------------------------------------------------------------------------
"Log_record" =>false,//whether to record the site log, the default does not log
"Log_record_level" =>array (' Emerg ', ' ALERT ', ' crit ', ' ERR '),//allow logging of log levels
"Log_file_size" =>2097152,//log file size limit, log records for file mode, more than automatically generate backup files


//---------------------------------------------------------------------------------------
Error configuration
//---------------------------------------------------------------------------------------
"Error_message" = "The page you are viewing has a temporary error!" Please try again later ~ ',//error display information non-debug mode valid
"Error_page" and "=",//Error orientation page, need to fill in the full URL address


//---------------------------------------------------------------------------------------
//Database configuration
---------------------------------------------------------------------------------------
"Db_charset" = ' UTF8 ',//database encoding, default with UTF8
"Db_deploy_type" =>0,///Database Deployment method: 0 Set Chinese (single-player) 1 distributed (Master-slave)
"db_rw_separate" = False,//database read/write is detached, the distributed database mode is valid under
"Db_fields_cache" =>true,//Open table field cache
"Db_type" = "MySQL",//database type
" Db_host "= ' localhost ',//database server address
" db_name "+",//Database name
"Db_user" + ' root ',//database user name
"db_pwd" = > ',//Database password
"Db_port" =>3306,//port used by database
"db_prefix" = ' think_ ',//database table prefix
"db_suffix" + ",// The table suffix of the database
"Db_fieldtype_check" =>false,//Whether Daemons row field type check


//---------------------------------------------------------------------------------------
//static cache configuration
---------------------------------------------------------------------------------------
"Html_file_suffix "= =". sHTML ',//default static file suffix
"html_cache_on" =>false,//default off static cache
"Html_cache_time" =>60,//static cache validity period
" Html_read_type "=>1,///static cache read mode 0 ReadFile 1 redirect


//---------------------------------------------------------------------------------------
//Data cache configuration
---------------------------------------------------------------------------------------
"Data_cache_type" = = ' file ',//data cache type support for File Db Apc Memcache shmop Sqlite Xcache apachenote eaccelerator
"Data_cache_path" =>temp_p ATH//cache path settings (valid only for file mode cache)
"Data_cache_time" =>-1,//data cache validity period
"data_cache_compress" =>false,// Whether the data cache compresses the cache
"Data_cache_check" =>false,//data cache checksum cache
"Data_cache_subdir" =>false,//Use a subdirectory cache ( Automatically create subdirectories based on hash of cache identity)
"Data_path_level" =>1,//subdirectory cache level


//---------------------------------------------------------------------------------------
Run Time Configuration
//---------------------------------------------------------------------------------------
"Show_run_time" =>false,//Run time display
"Show_adv_time" =>false,//show detailed run scheduled between, Show_run_time open after effective
"Show_db_times" =>false,//Display database read/write times
"Show_cache_times" =>false,//Display cache read/write times
"Show_use_mem" =>false,//display memory overhead
"Show_page_trace" =>false,//Display page trace information is assigned by the trace file definition and action action
"Show_error_msg" =>true,//error message displayed when an error occurs


//---------------------------------------------------------------------------------------
Cookie settings
//---------------------------------------------------------------------------------------
"Cookie_expire" =>3600,//coodie validity
"Cookie_domain" = ",//cookie valid domain name
"Cookie_path" = '/',//cookie path
"Cookie_prefix" = ",//cookie prefix avoids conflicts


//---------------------------------------------------------------------------------------
Token Authentication Configuration
//---------------------------------------------------------------------------------------
"Token_on" =>true,//Whether to enable token authentication
"Token_name" = ' __hash__ ',//token-validated form hidden field name
"Token_type" = ' md5 ',//token validation hash rule


//---------------------------------------------------------------------------------------
Default value Configuration
//---------------------------------------------------------------------------------------
"Default_app" = ' @ ',//Default model class where the project name @ indicates the current project
"Default_group" = ' Home ',//default grouping
"Default_module" = ' Index ',//default module name
"Default_action" = ' index ',//default action name
"Default_theme" = ' default ',///template theme Name
"Default_lang" = ' zh-cn ',//default language
"Default_timezone" = ' PRC ',//default time zone
"Default_ajax_return" = ' json ',//AJAX Data return format JSON XML ...
"Default_charset" = ' utf-8 ',//default page output code


//---------------------------------------------------------------------------------------
System Variable Configuration
//---------------------------------------------------------------------------------------
The following variables are configured primarily for URLs with special values, URLs and form parameters in the project try not to conflict with them, otherwise it is easy to cause errors.
"Var_pathinfo" = ' s ',//pathinfo compatibility mode get variables such as? S=/MODULE/ACTION/ID/1
"Var_group" = ' g ',//Default packet volume
"Var_route" = ' r ',//default route get variable
"Var_module" = ' m ',//default module get variable
"Var_action" = ' a ',//default action gets variable
"Var_page" = ' P ',//default page Jump transition amount
"Var_template" = ' t ',//default template toggle Variable
"Var_language" = ' l ',//default language toggle Variable
"Var_ajax_submit" = ' ajax ',//default AJAX commit variable


//---------------------------------------------------------------------------------------
Languages and time zones
//---------------------------------------------------------------------------------------
"LANG_SWITCH_ON" = false//whether to turn on multi-language feature, turn off by default

);
?>

http://www.bkjia.com/PHPjc/477160.html www.bkjia.com true http://www.bkjia.com/PHPjc/477160.html techarticle thinkphp config.php Detailed configuration file describes thinkphp config.php configuration issues? PHP return Array (//-------------------------------------- ----------------------------------------...

  • 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.