Think Basic Use of PHPTP Framework Supplement

WBOY
Release: 2016-07-28 08:28:33
Original
1075 people have browsed it

Remember: the TP file cannot be modified. If you need to modify it, you should modify it in the corresponding module of the project

Configuration file

  1. Core: ThinkPHP/Conf/conversion.php
  2. Public: Common/Conf/config.php
  3. Group module: Home/Conf/Config.php
    For the above three configuration files, the later configuration variables will overwrite the previous configuration variables

Function library file

  1. Core: ThinkPHP/Common/functions.php
  2. Public: Common/Common/function.php
  3. Group module :Home/Common/function.php
    For the above three configuration files, the latter configuration variables will overwrite the previous configuration variables. TP framework url address can be defined in the entry file in the following four
  4. <code><span>1.</span><span>http</span>://网址/index.php?m=XX&c=XX&<span>a</span>=XX   <span> //基本get模式 </span><span>2.</span><span>http</span>://网址/index.php/模块/控制器/操作方法  <span> //路径模式pathinfo </span><span>3.</span><span>http</span>://网址/模块/控制器/操作方法         <span> // rewrite重写模式 </span><span>4.</span><span>http</span>://网址/index.php?s=/模块/控制器/方法    <span> //兼容模式</span>
    具体url地址模式设置(配置文件ThinkPHP/Conf/convertion.php)
    URL_MODEL  =  <span>0</span>/<span>1</span>/<span>2</span>/<span>3</span>  分别代表四种url地址模式</code>
    Copy after login
development and production modes

Development mode: define(“APP_DEBUG”,true);

Production mode: define("APP_DEBUG",false);

Database settings

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

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

').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the basic use of Think PHPTP framework and supplements, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.
Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!