Common configuration options for thinkphp summarizing _php instances

Source: Internet
Author: User
Tags php template
The examples in this article describe common configuration options for thinkphp. Share to everyone for your reference, 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 open effective ' url_model ' + 1,//default to PATHINFO mode, providing the best user experience and SEO support//PATHINFO mode//Normal mode 1 parameters no order/m/module/a/act ION/ID/1//Intelligent Mode 2 Automatic identification module and operation/module/action/id/1/or/module,action,id,1/...//compatibility Mode 3 pass PathInfo to dispather through a get variable, The default is S INDEX.PHP?S=/MODULE/ACTION/ID/1 ' Path_model ' + 2,//default in smart mode ' PATH_DEPR ' + '/',//pathinfo parameter split ' route r_on ' = = false,//whether to turn on URL routing ' check_file_case ' and false,//whether to check the case of the file is valid for Windows platform ' tag_plugin_on ' = false,/ /whether to turn on the plug-in mechanism ' session_auto_start ' = true,//whether to automatically open the SESSION/* Log settings */' Web_log_record ' and false,//default log not logged ' Log_  Record_level ' = = Array (' Emerg ', ' ALERT ', ' crit ', ' ERR '),//allow logging of log levels ' log_file_size ' + 2097152,//log file size Limit/* Error settings */' debug_mode ' = False,//debug mode off by default ' error_message ' = ' = ' The page you are viewing has a temporary error! Please try again later ",//Error display information non-debug mode valid ' error_page ' = '",//Error directed page ' Show_erRor_msg ' = = true,/* system Variable Settings */' var_pathinfo ' + ' s ',//PATHINFO compatibility mode get variable For example? The parameters behind the S=/MODULE/ACTION/ID/1 depend on the Path_m Odel and Path_depr ' var_module ' + ' m ',//default module gets variable ' var_action ' = ' a ',//default action gets variable ' var_page ' = ' P ',//default paging jump Conversion amount ' var_template ' = ' t ',//default template toggle variable ' var_language ' = ' + ',//default language toggle variable ' var_ajax_submit ' = ' AJAX ',//default A  JAX Submit Variable/* module and operation settings */' default_module ' = ' index ',//default module name ' default_action ' = ' index ',//default action name/* Template settings */ ' tmpl_cache_on ' + true,//default to turn on template compilation cache false to recompile the template every time ' tmpl_cache_time ' +-1,//template cache validity period-1 permanent units in seconds ' Tmpl_swit   Ch_on ' + true,//enable multi-template support ' Auto_detect_theme ' and false,//auto-detect template theme ' Default_template ' + ' default ',//Defaults template name ' Template_suffix ' + '. html ',//default template file suffix ' cachfile_suffix ' = '. php ',//default template cache suffix ' output_charset ' + ' Utf-8 ',///Default output code ' tmpl_var_identify ' + ' array ',//template variable recognition blank automatically determine array array obj object/* Paging settings */' page_numbers ' + 5,// Page show pages ' list_numbers ' => 20,//page shows the number of records per page//model Settings */' auto_name_identify ' + true,//model corresponding data table name Intelligent identification usertype = User_type ' Default_mo Del_app ' + ' @ ',//the Default model class where the project name @ means the current project/* Static cache Settings */' 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 red Irect ' html_url_suffix ' = ' + ',//pseudo-static suffix set/* Language time zone settings */' time_zone ' + ' PRC ',//default time zone ' lang_switch_on ' = Fals E,//Turn off multi-language pack feature ' default_language ' + ' ZH-CN ',//default language ' Auto_detect_lang ' and false,//auto-detect language/* Database settings */' Db_c Harset ' + ' UTF8 ',//Database encoding defaults to UTF8 ' db_deploy_type ' + 0,//Database deployment mode 0 Set Chinese (single server) 1 distributed (slave server) ' Db_rw_se Parate ' + false, ' db_fields_cache ' = = true,/* data Cache Set */' data_cache_time ' +-1,//data cache expiration period ' data_cache_com Press ' = FALSE,///data cache is compressed cache ' Data_cache_check ' and false,//data cache Check Cache ' Data_cache_type ' + ' File ',//Data cache class Type support for File Db Apc MemcachE shmop Sqlite Xcache apachenote eaccelerator ' data_cache_path ' + temp_path,//cache path settings (valid only for file mode cache) ' Data_cache_su Bdir ' + false,//Use subdirectory cache (automatically create subdirectories based on hash of cache identity) ' Data_path_level ' + 1,//Sub-directory 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 verbose run time ' show _db_times ' + false,//display database query and write count ' show_cache_times ' + false,//display cache operation count ' show_use_mem ' = false,//display memory on  Pin ' Show_page_trace ' and false,//Display page trace information is assigned by the trace file definition and action action/* template engine settings */' tmpl_engine_type ' = ' Think ',// The default template engine for the following settings is only valid for use with the Think template engine ' tmpl_deny_func_list ' = ' echo,exit ',//Template engine disable function ' Tmpl_l_delim ' + ' {',//Template engine General tab start Tag ' Tmpl_r_delim ' + '} ',//template engine plain tag end tag ' taglib_begin ' = ' < ',//tag library tag start tag ' taglib_end ' + ' > ',//label Library tag end tag ' tag_nested_level ' + 3,//Tag library ' taglib_list ' = ' cx,html ',//built-in tag library name /* Cookie Set */' cookie_expire ' + 3600,//Coodie validity period ' cookie_domain ' + ',//cookie valid domain name ' cookie_path ' = '/ ',///cookie path ' cookie_prefix ' + ',//cookie prefix avoidance conflict/* Data format settings */' ajax_return_type ' = ' JSON ',//ajax data return format J SON XML .../* Other settings */' Auto_load_path ' + ' think.util. ',//__autoload path settings The model and action classes of the current project are automatically loaded without setting attention to the search order ' A Ction_jump_tmpl ' + ' public:success ',//page jump template file ' action_404_tmpl ' = ' public:404 ',//404 error template file ' App_domain_ Deploy ' = = false,//whether to use the standalone Domain name deployment project/* External configuration file that needs to be loaded */' extend_config_list ' =>array (' taglibs ', ' routes ', ' tags ', ' Htmls ', ' modules ', ' actions '),//built-in optional configuration includes: Taglibs tag library definition routes route definition tags tag definition htmls static cache definition Modules expansion Module actions extended operation);

More interested in thinkphp related content readers can view this site topic: "thinkphp Introductory Tutorial", "thinkphp Common Methods Summary", "Smarty Template Primer Basic Tutorial" and "PHP template technology Summary."

It is hoped that this article is helpful to 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.