Summary of common ThinkPHP configuration options, thinkphp configuration option _ PHP Tutorial

Source: Internet
Author: User
Summary of common ThinkPHP configuration options and thinkphp configuration options. Summary of common configuration options of ThinkPHP. thinkphp configuration options this article describes the common configuration options of ThinkPHP. For your reference, refer to returnarray (* Summary of common configuration options of Di ThinkPHP and thinkphp configuration options ).

This example describes common ThinkPHP configuration options. We will share this with you for your reference. The details are as follows:

Return array (/* Dispatch settings */'Dispatch _ on' => true, // whether to enable the Dispatcher // URL mode: 0 Normal Mode 1 PATHINFO 2 REWRITE 3 compatibility mode when DISPATCH_ON is enabled, 'URL _ model' => 1 is valid, // PATHINFO mode is used by default, provide the best user experience and SEO support // PATHINFO mode // Normal Mode 1 parameter no order/m/module/a/action/id/1 // intelligent mode 2 automatic recognition 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 value is s index. php? S =/module/action/id/1 'path _ model' => 2, // The smart mode 'path _ Demo' => '/' is used by default '/', // 'router _ on' => false, which is the delimiter between PATHINFO parameters, // whether to enable the URL routing 'check _ FILE_CASE '=> false, // check whether the file's case sensitivity is valid for Windows 'tag _ PLUGIN_ON '=> false, // whether to enable the plug-in mechanism 'session _ AUTO_START' => true, // whether to automatically enable Session/* LOG settings */'web _ LOG_RECORD '=> false, // by default, logs are not logged 'log _ RECORD_LEVEL' => array ('emer ', 'alert ', 'crit', 'err'), // The LOG level that can be recorded 'log _ FILE_SIZ E '=> 2097152, // log file size limit/* error setting */'debug _ mode' => false, // in debug mode, 'error _ message' => 'is disabled by default. the page you are browsing has an ERROR! Please try again later ~ ', // The ERROR display information is valid in non-debug mode 'error _ page' => '', // The ERROR orientation PAGE 'show _ ERROR_MSG' => true, /* set system variables */'Var _ pathinfo' =>'s ', // Obtain variables in PATHINFO compatibility mode, for example? The parameters after s =/module/action/id/1 depend on PATH_MODEL and PATH_DEPR 'Var _ module' =>'m ', // The default module obtains the variable 'Var _ action' => 'A'. // The default operation obtains the variable 'Var _ page' => 'P ', // The default paging jump variable 'Var _ template' => 'T', // the default TEMPLATE switch variable 'Var _ template' => 'L ', // Default Language switch variable 'Var _ AJAX_SUBMIT '=> 'Ajax ', // default ajax submission variable/* MODULE and Operation setting */'default _ module' => 'index ', // DEFAULT module name 'default _ action' => 'index', // DEFAULT operation name/* template setting */'tmpl _ CACHE_ON '=> true, // enable the template by default If the compile cache is false, the template 'tmpl _ CACHE_TIME '=>-1, // template cache validity period-1 permanent unit: 'tmpl _ SWITCH_ON' => true, // enable multi-TEMPLATE support for 'auto _ DETECT_THEME '=> false, // automatically detects the TEMPLATE topic 'default _ template' => 'default ', // Default 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 identification left blank automatic judgment array obj object/* PAGE setting */'page _ NUMB ERS '=> 5, // page display page number 'list _ NUMBERS' => 20, // number of records displayed on each page/* model setting */'auto _ NAME_IDENTIFY '=> true, // UserType => user_type 'default _ MODEL_APP '=> '@', // the project name of the default model class @ indicates the current project/* static cache settings */'HTML _ FILE_SUFFIX '=> '.shtml ', // The default static file suffix 'HTML _ CACHE_ON '=> false, // The default static file suffix 'HTML _ CACHE_TIME' => 60, // static cache validity period: 'HTML _ READ_TYPE '=> 1, // static cache read mode: 0 readfile 1 redirect 'HTML _ URL_SUFFIX' =>'', // Pseudo-static suffix setting/* Language time zone setting */'time _ region' => 'prc', // Default time zone 'Lang _ SWITCH_ON '=> false, // by DEFAULT, the multi-LANGUAGE package function 'default _ language' => 'zh-cn' is disabled. // the default language 'auto _ DETECT_LANG '=> false, // automatic detection language/* database settings */'DB _ charset' => 'utf8', // The database encoding uses utf8'db _ DEPLOY_TYPE '=> 0 by default, // Database deployment method 0 centralized (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 period 'data _ CAC HE_COMPRESS '=> false, // whether the DATA cache compresses the cache 'data _ CACHE_CHECK' => false, // whether the DATA cache verifies the cache 'data _ CACHE_TYPE '=> 'File ', // the DATA cache type supports File Db Apc Memcache Shmop Sqlite Xcache Apachenote Eaccelerator 'data _ CACHE_PATH '=> TEMP_PATH, // cache path setting (only effective for File cache) 'data _ cache_subdir' => false, // use the subdirectory cache (automatically create the subdirectory based on the hash of the cache ID) 'data _ PATH_LEVEL '=> 1, // subdirectory CACHE level 'cache _ SERIAL_HEADER '=> "<? Php \ n // ", // The file CACHE begins to mark 'cache _ SERIAL_FOOTER '=>" \ n? ". ">", // File cache end mark/* running time setting */'show _ RUN_TIME '=> false, // The running time is displayed as 'show _ ADV_TIME' => false, // display the detailed running time 'show _ DB_TIMES '=> false, // display the number of database queries and writes 'show _ CACHE_TIMES' => false, // display the number of cache operations 'show _ USE_MEM '=> false, // display the memory overhead 'show _ PAGE_TRACE' => false, // display the page Trace information, which is defined by the Trace file and assigned values by Action operations/* Template engine settings */'tmpl _ ENGINE_TYPE '=> 'think ', // Default Template engine the following settings are only valid for the Think template engine 'tmpl _ DENY_FUNC_LIST '=> 'echo, exit ', // The template engine disables the function 'tmpl _ L_DELIM '=>' {', // The General tag of the template engine starts to Mark 'tmpl _ R_DELIM' => '}', // 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 setting */'cookie _ EXPIRE '=> 3600, // Coodie validity period 'cookie _ DOMAIN' => '', // Cookie valid domain name 'cookie _ path' => '/', // cookie path 'cookie _ prefix' => '', // avoid Cookie prefix conflict/* data format setting */'Ajax _ RETURN_TYPE '=> 'json', // json xml format returned by AJAX data... /* Other settings */'auto _ LOAD_PATH '=> 'Think. util. ', // _ autoLoad path setting the Model and Action class of the current project will be automatically loaded, without the need to set the search order 'action _ JUMP_TMPL' => 'public: success ', // The template file 'action _ 404_TMPL '=> 'public: 000000', // The template file 'app _ DOMAIN_DEPLOY' => false, // use an independent domain name to deploy the project/* External configuration file to be loaded */'extend _ CONFIG_LIST '=> array ('taglibs', 'Routes', 'tags ', & apos; htmls', & apos; modules & apos; actions & apos;), // optional built-in configurations include: taglibs label Library definition routes route definition tags label definition htmls static cache definition modules extension module actions extension operation );

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.