Home > PHP Framework > ThinkPHP > body text

Description of common configuration variables in Thinkphp

angryTom
Release: 2020-03-30 13:21:58
forward
2458 people have browsed it

This article introduces the description of common configuration variables of thinkphp. The comments in the code are very detailed. I hope it will be helpful to friends who are learning thinkphp!

Description of common configuration variables in Thinkphp

Thinkphp common configuration variable description

Configuration variables exist in the /ThinkPHP/Conf/convention.php file, The comments are very detailed

(Recommended tutorial: thinkphp tutorial)

Examples of some commonly used configuration variables

'DB_TYPE'               => 'mysql',     // 数据库类型
'DB_HOST'               => 'localhost', // 服务器地址
'DB_NAME'               => '',          // 数据库名
'DB_USER'               => 'root',      // 用户名
'DB_PWD'                => '',          // 密码
'DB_PORT'               => '',        // 端口
'DB_PREFIX'             => 'think_',    // 数据库表前缀
'DB_CHARSET'            => 'utf8',      // 数据库编码默认采用utf8
'URL_CASE_INSENSITIVE'  => false,   // 默认false 表示URL区分大小写 true则表示不区分大小写
'URL_MODEL'             => 1,       // URL访问模式,可选参数0、1、2、3,代表以下四种模式:
// 0 (普通模式); 1 (PATHINFO 模式); 2 (REWRITE  模式); 3 (兼容模式)  默认为PATHINFO 模式,提供最好的用户体验和SEO支持
'URL_HTML_SUFFIX'       => 'html',  // URL伪静态后缀设置
Copy after login

Variables that appear in the configuration file can be customized Redefine it in the configuration file to meet specific functional requirements!

The above is the detailed content of Description of common configuration variables in Thinkphp. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template