国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
A summary of common configuration options of ThinkPHP, thinkphp configuration options
Articles you may be interested in:
Home Backend Development PHP Tutorial Summary of common configuration options of ThinkPHP, thinkphp configuration options_PHP tutorial

Summary of common configuration options of ThinkPHP, thinkphp configuration options_PHP tutorial

Jul 12, 2016 am 08:56 AM
thinkphp Configuration

A summary of common configuration options of ThinkPHP, thinkphp configuration options

This article describes the common configuration options of ThinkPHP with examples. Share it with everyone for your reference, the details are as follows:

return array(
  /* Dispatch設(shè)置 */
  'DISPATCH_ON' => true, // 是否啟用Dispatcher
  // URL模式: 0 普通模式 1 PATHINFO 2 REWRITE 3 兼容模式 當(dāng)DISPATCH_ON開(kāi)啟后有效
  'URL_MODEL' => 1, // 默認(rèn)為PATHINFO 模式,提供最好的用戶體驗(yàn)和SEO支持
  // PATHINFO 模式
  // 普通模式1 參數(shù)沒(méi)有順序/m/module/a/action/id/1
  // 智能模式2 自動(dòng)識(shí)別模塊和操作/module/action/id/1/ 或者 /module,action,id,1/...
  // 兼容模式3 通過(guò)一個(gè)GET變量將PATHINFO傳遞給dispather,默認(rèn)為s index.php?s=/module/action/id/1
  'PATH_MODEL' => 2, // 默認(rèn)采用智能模式
  'PATH_DEPR' => '/', // PATHINFO參數(shù)之間分割號(hào)
  'ROUTER_ON' => false, // 是否開(kāi)啟URL路由
  'CHECK_FILE_CASE' => false, // 是否檢查文件的大小寫 對(duì)Windows平臺(tái)有效
  'TAG_PLUGIN_ON' => false, // 是否開(kāi)啟插件機(jī)制
  'SESSION_AUTO_START' => true, // 是否自動(dòng)開(kāi)啟Session
  /* 日志設(shè)置 */
  'WEB_LOG_RECORD' => false, // 默認(rèn)不記錄日志
  'LOG_RECORD_LEVEL' => array('EMERG','ALERT','CRIT','ERR'), // 允許記錄的日志級(jí)別
  'LOG_FILE_SIZE' => 2097152, // 日志文件大小限制
  /* 錯(cuò)誤設(shè)置 */
  'DEBUG_MODE' => false, // 調(diào)試模式默認(rèn)關(guān)閉
  'ERROR_MESSAGE' => '您瀏覽的頁(yè)面暫時(shí)發(fā)生了錯(cuò)誤!請(qǐng)稍后再試~', // 錯(cuò)誤顯示信息 非調(diào)試模式有效
  'ERROR_PAGE' => '', // 錯(cuò)誤定向頁(yè)面
  'SHOW_ERROR_MSG' => true,
  /* 系統(tǒng)變量設(shè)置 */
  'VAR_PATHINFO' => 's', // PATHINFO 兼容模式獲取變量例如 ?s=/module/action/id/1 后面的參數(shù)取決于PATH_MODEL 和 PATH_DEPR
  'VAR_MODULE' => 'm', // 默認(rèn)模塊獲取變量
  'VAR_ACTION' => 'a', // 默認(rèn)操作獲取變量
  'VAR_PAGE' => 'p', // 默認(rèn)分頁(yè)跳轉(zhuǎn)變量
  'VAR_TEMPLATE' => 't', // 默認(rèn)模板切換變量
  'VAR_LANGUAGE' => 'l', // 默認(rèn)語(yǔ)言切換變量
  'VAR_AJAX_SUBMIT' => 'ajax', // 默認(rèn)的AJAX提交變量
  /* 模塊和操作設(shè)置 */
  'DEFAULT_MODULE' => 'Index', // 默認(rèn)模塊名稱
  'DEFAULT_ACTION' => 'index', // 默認(rèn)操作名稱
  /* 模板設(shè)置 */
  'TMPL_CACHE_ON' => true, // 默認(rèn)開(kāi)啟模板編譯緩存 false 的話每次都重新編譯模板
  'TMPL_CACHE_TIME' => -1, // 模板緩存有效期 -1 永久 單位為秒
  'TMPL_SWITCH_ON' => true, // 啟用多模版支持
  'AUTO_DETECT_THEME' => false, // 自動(dòng)偵測(cè)模板主題
  'DEFAULT_TEMPLATE' => 'default', // 默認(rèn)模板名稱
  'TEMPLATE_SUFFIX' => '.html', // 默認(rèn)模板文件后綴
  'CACHFILE_SUFFIX' => '.php', // 默認(rèn)模板緩存后綴
  'OUTPUT_CHARSET' => 'utf-8', // 默認(rèn)輸出編碼
  'TMPL_VAR_IDENTIFY' => 'array', // 模板變量識(shí)別 留空自動(dòng)判斷 array 數(shù)組 obj 對(duì)象
  /* 分頁(yè)設(shè)置 */
  'PAGE_NUMBERS' => 5, // 分頁(yè)顯示頁(yè)數(shù)
  'LIST_NUMBERS' => 20, // 分頁(yè)每頁(yè)顯示記錄數(shù)
  /* 模型設(shè)置 */
  'AUTO_NAME_IDENTIFY' => true, // 模型對(duì)應(yīng)數(shù)據(jù)表名稱智能識(shí)別 UserType => user_type
  'DEFAULT_MODEL_APP' => '@', // 默認(rèn)模型類所在的項(xiàng)目名稱 @ 表示當(dāng)前項(xiàng)目
  /* 靜態(tài)緩存設(shè)置 */
  'HTML_FILE_SUFFIX' => '.shtml', // 默認(rèn)靜態(tài)文件后綴
  'HTML_CACHE_ON' => false, // 默認(rèn)關(guān)閉靜態(tài)緩存
  'HTML_CACHE_TIME' => 60, // 靜態(tài)緩存有效期
  'HTML_READ_TYPE' => 1, // 靜態(tài)緩存讀取方式 0 readfile 1 redirect
  'HTML_URL_SUFFIX' => '', // 偽靜態(tài)后綴設(shè)置
  /* 語(yǔ)言時(shí)區(qū)設(shè)置 */
  'TIME_ZONE' => 'PRC', // 默認(rèn)時(shí)區(qū)
  'LANG_SWITCH_ON' => false, // 默認(rèn)關(guān)閉多語(yǔ)言包功能
  'DEFAULT_LANGUAGE' => 'zh-cn', // 默認(rèn)語(yǔ)言
  'AUTO_DETECT_LANG' => false, // 自動(dòng)偵測(cè)語(yǔ)言
  /* 數(shù)據(jù)庫(kù)設(shè)置 */
  'DB_CHARSET' => 'utf8', // 數(shù)據(jù)庫(kù)編碼默認(rèn)采用utf8
  'DB_DEPLOY_TYPE'      => 0,     // 數(shù)據(jù)庫(kù)部署方式 0 集中式(單一服務(wù)器) 1 分布式(主從服務(wù)器)
  'DB_RW_SEPARATE' => false,
  'DB_FIELDS_CACHE' => true,
  /* 數(shù)據(jù)緩存設(shè)置 */
  'DATA_CACHE_TIME' => -1, // 數(shù)據(jù)緩存有效期
  'DATA_CACHE_COMPRESS' => false, // 數(shù)據(jù)緩存是否壓縮緩存
  'DATA_CACHE_CHECK' => false, // 數(shù)據(jù)緩存是否校驗(yàn)緩存
  'DATA_CACHE_TYPE' => 'File', // 數(shù)據(jù)緩存類型 支持 File Db Apc Memcache Shmop Sqlite Xcache Apachenote Eaccelerator
  'DATA_CACHE_PATH' => TEMP_PATH, // 緩存路徑設(shè)置 (僅對(duì)File方式緩存有效)
  'DATA_CACHE_SUBDIR' => false, // 使用子目錄緩存 (自動(dòng)根據(jù)緩存標(biāo)識(shí)的哈希創(chuàng)建子目錄)
  'DATA_PATH_LEVEL' => 1, // 子目錄緩存級(jí)別
  'CACHE_SERIAL_HEADER' => "<&#63;php\n//", // 文件緩存開(kāi)始標(biāo)記
  'CACHE_SERIAL_FOOTER' => "\n&#63;".">", // 文件緩存結(jié)束標(biāo)記
  /* 運(yùn)行時(shí)間設(shè)置 */
  'SHOW_RUN_TIME' => false, // 運(yùn)行時(shí)間顯示
  'SHOW_ADV_TIME' => false, // 顯示詳細(xì)的運(yùn)行時(shí)間
  'SHOW_DB_TIMES' => false, // 顯示數(shù)據(jù)庫(kù)查詢和寫入次數(shù)
  'SHOW_CACHE_TIMES' => false, // 顯示緩存操作次數(shù)
  'SHOW_USE_MEM' => false, // 顯示內(nèi)存開(kāi)銷
  'SHOW_PAGE_TRACE' => false, // 顯示頁(yè)面Trace信息 由Trace文件定義和Action操作賦值
  /* 模板引擎設(shè)置 */
  'TMPL_ENGINE_TYPE' => 'Think', // 默認(rèn)模板引擎 以下設(shè)置僅對(duì)使用Think模板引擎有效
  'TMPL_DENY_FUNC_LIST' => 'echo,exit', // 模板引擎禁用函數(shù)
  'TMPL_L_DELIM' => '{', // 模板引擎普通標(biāo)簽開(kāi)始標(biāo)記
  'TMPL_R_DELIM' => '}', // 模板引擎普通標(biāo)簽結(jié)束標(biāo)記
  'TAGLIB_BEGIN' => '<', // 標(biāo)簽庫(kù)標(biāo)簽開(kāi)始標(biāo)記
  'TAGLIB_END' => '>', // 標(biāo)簽庫(kù)標(biāo)簽結(jié)束標(biāo)記
  'TAG_NESTED_LEVEL' => 3, // 標(biāo)簽庫(kù)
  'TAGLIB_LIST' => 'cx,html', // 內(nèi)置標(biāo)簽庫(kù)名稱
  /* Cookie設(shè)置 */
  'COOKIE_EXPIRE' => 3600, // Coodie有效期
  'COOKIE_DOMAIN' => '', // Cookie有效域名
  'COOKIE_PATH' => '/', // Cookie路徑
  'COOKIE_PREFIX' => '', // Cookie前綴 避免沖突
  /* 數(shù)據(jù)格式設(shè)置 */
  'AJAX_RETURN_TYPE' => 'JSON', //AJAX 數(shù)據(jù)返回格式 JSON XML ...
  /* 其它設(shè)置 */
  'AUTO_LOAD_PATH' => 'Think.Util.', // __autoLoad 的路徑設(shè)置 當(dāng)前項(xiàng)目的Model和Action類會(huì)自動(dòng)加載,無(wú)需設(shè)置 注意搜索順序
  'ACTION_JUMP_TMPL'=> 'Public:success', // 頁(yè)面跳轉(zhuǎn)的模板文件
  'ACTION_404_TMPL'=> 'Public:404', // 404錯(cuò)誤的模板文件
  'APP_DOMAIN_DEPLOY' => false, // 是否使用獨(dú)立域名部署項(xiàng)目
  /* 需要加載的外部配置文件 */
  'EXTEND_CONFIG_LIST'=>array('taglibs','routes','tags','htmls','modules','actions'),
  // 內(nèi)置可選配置包括:taglibs 標(biāo)簽庫(kù)定義 routes 路由定義 tags 標(biāo)簽定義 htmls 靜態(tài)緩存定義 modules 擴(kuò)展模塊 actions 擴(kuò)展操作
);

Readers who are interested in more thinkPHP-related content can check out the special topics on this site: "ThinkPHP Getting Started Tutorial", "ThinkPHP Common Methods Summary", "Smarty Template Basic Tutorial" and "PHP Template Technology Summary".

I hope this article will be helpful to everyone’s PHP programming based on the ThinkPHP framework.

Articles you may be interested in:

  • Analysis of ThinkPHP project grouping configuration method
  • Nginx configuration supports ThinkPHP’s PATH_INFO
  • Nginx supports Thinkphp URL Rewrite Configuration example
  • THINKPHP supports YAML configuration file setting method
  • thinkPHP study notes installation and configuration article
  • thinkphp configuration connection database skills
  • thinkphp URL routing Rules and configuration examples
  • Methods for combining ThinkPHP public configuration files with configuration files in respective projects
  • Mapping analysis of public function paths and configuration item paths in ThinkPHP
  • ThinkPHP convention configuration Detailed file explanation
  • Configure pathinfo mode in nginx to support thinkphp URL rewriting
  • Modify the apache configuration file to remove index.php in thinkphp url
  • Parse thinkphp basic configuration convention. php

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1113700.htmlTechArticleA summary of common configuration options of ThinkPHP, thinkphp configuration options This article describes the common configuration options of ThinkPHP with examples. Share it with everyone for your reference, the details are as follows: return array( /* Di...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The working principle and configuration method of GDM in Linux system The working principle and configuration method of GDM in Linux system Mar 01, 2024 pm 06:36 PM

Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

How to run thinkphp project How to run thinkphp project Apr 09, 2024 pm 05:33 PM

To run the ThinkPHP project, you need to: install Composer; use Composer to create the project; enter the project directory and execute php bin/console serve; visit http://localhost:8000 to view the welcome page.

There are several versions of thinkphp There are several versions of thinkphp Apr 09, 2024 pm 06:09 PM

ThinkPHP has multiple versions designed for different PHP versions. Major versions include 3.2, 5.0, 5.1, and 6.0, while minor versions are used to fix bugs and provide new features. The latest stable version is ThinkPHP 6.0.16. When choosing a version, consider the PHP version, feature requirements, and community support. It is recommended to use the latest stable version for best performance and support.

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

How to run thinkphp How to run thinkphp Apr 09, 2024 pm 05:39 PM

Steps to run ThinkPHP Framework locally: Download and unzip ThinkPHP Framework to a local directory. Create a virtual host (optional) pointing to the ThinkPHP root directory. Configure database connection parameters. Start the web server. Initialize the ThinkPHP application. Access the ThinkPHP application URL and run it.

Which one is better, laravel or thinkphp? Which one is better, laravel or thinkphp? Apr 09, 2024 pm 03:18 PM

Performance comparison of Laravel and ThinkPHP frameworks: ThinkPHP generally performs better than Laravel, focusing on optimization and caching. Laravel performs well, but for complex applications, ThinkPHP may be a better fit.

How to install thinkphp How to install thinkphp Apr 09, 2024 pm 05:42 PM

ThinkPHP installation steps: Prepare PHP, Composer, and MySQL environments. Create projects using Composer. Install the ThinkPHP framework and dependencies. Configure database connection. Generate application code. Launch the application and visit http://localhost:8000.

How is the performance of thinkphp? How is the performance of thinkphp? Apr 09, 2024 pm 05:24 PM

ThinkPHP is a high-performance PHP framework with advantages such as caching mechanism, code optimization, parallel processing and database optimization. Official performance tests show that it can handle more than 10,000 requests per second and is widely used in large-scale websites and enterprise systems such as JD.com and Ctrip in actual applications.

See all articles