thinkphp Common configuration options Rollup _php instances

Source: Internet
Author: User
Tags php template smarty template

The examples in this article describe the common configuration options for thinkphp. Share to everyone for your reference, specific as follows:

return Array (/* DISPATCH set/' dispatch_on ' => true,//whether dispatcher//URL mode is enabled: 0 Normal mode 1 pathinfo 2 REWRITE 3 Compatibility mode when DISPATCH_ON is turned on effective ' Url_model ' => 1,///default to PathInfo mode, provide best user experience and SEO support//pathinfo mode//Normal mode 1 parameters no order/m/modul E/A/ACTION/ID/1//Smart Mode 2 automatic recognition module and operation/module/action/id/1/or/module,action,id,1/...//compatibility Mode 3 pass PathInfo to Dispat via a Get variable
  Her, defaults to S index.php?s=/module/action/id/1 ' Path_model ' => 2,//default to Smart mode ' PATH_DEPR ' => '/',///PathInfo split between parameters  ' router_on ' => false,//whether to open URL route ' check_file_case ' => false,//whether to check that file capitalization is valid for Windows platform ' tag_plugin_on ' => False,//whether to open the plug-in mechanism ' Session_auto_start ' => true,//whether automatically open session/Log Settings/' Web_log_record ' => false,//default Log ' log_record_level ' => array (' Emerg ', ' ALERT ', ' crit ', ' ERR ') is not logged,//log level allowed for logging ' log_file_size ' => 2097152,//Log text Size Limit/* Error setting/' Debug_mode ' => false,//debug mode defaults to close ' error_message ' => ' Your browsing page has been temporarily wrong! Please try again later ~ ',///error display information non-debug mode effective ' Error_page ' =>',//Error oriented page ' Show_error_msg ' => true,/* system variable Set/' Var_pathinfo ' => ',//pathinfo compatibility mode get variable for example? s=/module/ The parameters behind the ACTION/ID/1 depend on the Path_model and Path_depr ' Var_module ' => ' m ',///default module Gets the variable ' var_action ' => ' a ',//The default action gets the variable ' Var_page ' => ' P ',//default paging jump conversion ' var_template ' => ' t ',//default template switching variable ' var_language ' => ' l ',//default language switching variable ' Var_aj Ax_submit ' => ' ajax,//default AJAX submission variable/* module and operation set/' Default_module ' => ' Index ',//default module name ' Default_action ' =&G T ' Index ',///default action name/* Template set/' tmpl_cache_on ' => true,///default to open template compilation cache false every time you recompile the template ' Tmpl_cache_time ' =>-1 ,//Template cache validity period-1 permanent unit seconds ' tmpl_switch_on ' => true,//enable multimode support ' Auto_detect_theme ' => false,//Auto Detect template theme ' Defaul  T_template ' => ' defaults ',//default template name ' Template_suffix ' => '. html ',//default template file suffix ' cachfile_suffix ' => '. php ',// Default template cache suffix ' output_charset ' => ' utf-8 ',//default output encoding ' tmpl_var_identify ' => ' array ',//template variable identification left blank Auto Judge array array obj Like/* Paging settings * * PAGE_numbers ' => 5,//page pagination Display page ' list_numbers ' => 20,//page paging display record number/* model set/' Auto_name_identify ' => true,//die Type corresponding data table name Intelligent recognition usertype => user_type ' default_model_app ' => ' @ ',////The name of the project with the default model class @ represents the current project//static Cache setting * * * * html_fil
  E_suffix ' => '. shtml ',//default static file suffix ' html_cache_on ' => false,//default shutdown static cache ' Html_cache_time ' => 60,//static cache expiration ' Html_read_type ' => 1,//static cache read mode 0 ReadFile 1 redirect ' Html_url_suffix ' => ',//pseudo-static suffix set//language time zone set */' T
  Ime_zone ' => ' PRC ',//default time zone ' lang_switch_on ' => false,//default off MultiLanguage Pack feature ' default_language ' => ' ZH-CN ',//default language      ' Auto_detect_lang ' => false,//automatic detection language/* Database Settings/' db_charset ' => ' UTF8 ',//Database encoding defaults to UTF8 ' db_deploy_type ' => 0,//Database deployment mode 0 Set Chinese (single server) 1 distributed (master-slave server) ' Db_rw_separate ' => false, ' Db_fields_cache ' => true,/ * Data Cache Settings * * * * data_cache_time ' =>-1,//Data cache validity ' data_cache_compress ' => false,//data cache compression cache ' Data_cache_chec K ' => false,//data caching isNo checksum cache ' Data_cache_type ' => ' file ',//data cache type supports File Db Apc Memcache shmop Sqlite Xcache apachenote eaccelerator ' D 
  Ata_cache_path ' => Temp_path,//cache path settings (valid for file caching only) ' Data_cache_subdir ' => false,///Use subdirectory cache (automatically create subdirectories based on cache identity hash)  ' Data_path_level ' => 1,//subdirectory cache level ' Cache_serial_header ' => ' <?php\n//',//File cache start tag ' cache_serial_footer ' => "\ n?". > ",//File cache end tag//run time setting */' Show_run_time ' => false,//Run time display ' Show_adv_time ' => false,//show detailed run time '  Show_db_times ' => false,//display database query and write count ' Show_cache_times ' => false,//show cache operation Count ' Show_use_mem ' => false,// Display memory overhead ' show_page_trace ' => false,//Show page trace information is assigned by trace file definition and action operation/* template engine Settings/' Tmpl_engine_type ' => ' T  Hink ',//default template engine The following settings are valid only for use of the "I" Tmpl_deny_func_list ' => ' echo,exit ',//template engine disables function ' Tmpl_l_delim ' => ' {',//  Template engine normal label start tag ' Tmpl_r_delim ' => '} ',//template engine normal tag end tag ' taglib_begin ' => ' < ',//tag library tag start tag ' taglib_end ' => ' > ',//tag library tag end tag ' Tag_nested_level ' => 3,//Tag library ' taglib_list ' => ' cx,html ',//built-in tag library name * * COOKIE set/' COOKIE_EX Pire ' => 3600,//Coodie validity ' cookie_domain ' => ',//cookie valid domain name ' cookie_path ' => '/',//cookie path ' Cookie_ PREFIX ' => ',//cookie prefix avoidance conflict/* Data Format set */' Ajax_return_type ' => ' json ',//ajax data return format JSON XML .../* Other settings * * ' Auto_load_path ' => ' think.util. ',//__autoload path Setting the current project's model and ACTION classes will automatically load without setting attention to search order ' Action_jump_tmpl ' =&G T ' Public:success ',//page jump template file ' Action_404_tmpl ' => ' public:404 ',///404 wrong template file ' App_domain_deploy ' => false,// Whether to use a stand-alone domain name deployment project//external configuration file to load * * * extend_config_list ' =>array (' taglibs ', ' routes ', ' tags ', ' htmls ', ' modules ', '

 Actions '),//built-in optional configuration includes: Taglibs tag library definition routes Routing definition tags tag definition htmls static cache definition Modules Extension Module actions extension operation);

More interested in thinkphp related content readers can view the site topics: "thinkphp Introductory Course", "thinkphp Common Methods Summary", "Smarty Template Primer" and "PHP template technology Summary."

I hope this article will help you with the PHP program design based on thinkphp framework.

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.