Basic use supplement of Think PHPTP framework

Source: Internet
Author: User
Remember: TP files can not be modified and need to be modified in the corresponding module of the project

Configuration file

    1. Core: thinkphp/conf/convertion.php
    2. Public: common/conf/config.php
    3. Block module: home/conf/config.php
      Above the three configuration files, the following configuration variables overwrite the previous configuration variables

function library file

    1. Core: thinkphp/common/functions.php
    2. Public: common/common/function.php
    3. Block module: home/common/function.php
      Above the three configuration files, the following configuration variables overwrite the previous configuration variables

The TP frame URL address can be made up of the following four

1.http://网址/index.php?m=XX&c=XX&a=XX    //基本get模式 2.http://网址/index.php/模块/控制器/操作方法   //路径模式pathinfo 3.http://网址/模块/控制器/操作方法          // rewrite重写模式 4.http://网址/index.php?s=/模块/控制器/方法     //兼容模式具体url地址模式设置(配置文件ThinkPHP/Conf/convertion.php)URL_MODEL  =  0/1/2/3  分别代表四种url地址模式

Development, production model

In the Portal file definition
Development mode: Define ("App_debug", true);
Production mode: Define ("App_debug", false);

Database Settings

'DB_TYPE'               =>  '',     // 数据库类型'DB_HOST'               =>  ''// 服务器地址'DB_NAME'               =>  '',          // 数据库名'DB_USER'               =>  '',      // 用户名'DB_PWD'                =>  '',          // 密码'DB_PORT'               =>  '',        // 端口'DB_PREFIX'             =>  '',    // 数据库表前缀

Specific reference: Http://document.thinkphp.cn/manual_3_2.html#config_reference

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the basic use of Think PHPTP framework, including the contents of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.