ThinkPHP framework configuration

WBOY
Release: 2016-07-29 09:01:32
Original
977 people have browsed it

ThinkPHP framework configuration

  • Download the ThinkPHP framework from the official website http://www.thinkphp.cn
  • Copy the ThinkPHP file in the downloaded file to the server. The example here is to put it under the htdocs of MAMP
  • Create a new folder under htdocs (you can name it according to your own project)
  • Go into the newly created folder and create an index.php file
  • Edit the index.php file
    <br> <?php <br> define(APP_DEBUG, True); <br> require"../thinkPHP/thinkPHP.php"; <br> ?> <br>
  • Access the server address in the browser. Here is an example: http://localhost:8888/FirstThinkPHP/index.php. FirstThinkPHP is the name of the newly created folder, and index.php is the newly created file.
  • Return to FirstThinkPHP Next, I found 3 more folders ThinkPHP framework configuration
  • /Applications/MAMP/htdocs/FirstThinkPHP/Home/Controller/ which is the location of the general app interface file. It can be accessed through the address http://localhost:8888/FirstThinkPHP/index.php/home /GoodsType/type to access
  • The database configuration is attached below:
<code><span>//数据库配置信息</span><span>'DB_TYPE'</span>   => <span>'mysql'</span>, <span>// 数据库类型</span><span>'DB_HOST'</span>   => <span>'localhost'</span>, <span>// 服务器地址</span><span>'DB_NAME'</span>   => <span>'thinkphp'</span>, <span>// 数据库名</span><span>'DB_USER'</span>   => <span>'root'</span>, <span>// 用户名</span><span>'DB_PWD'</span>    => <span>'123456'</span>, <span>// 密码</span><span>'DB_PORT'</span>   => <span>3306</span>, <span>// 端口</span><span>'DB_PREFIX'</span> => <span>'think_'</span>, <span>// 数据库表前缀 </span><span>'DB_CHARSET'</span>=> <span>'utf8'</span>, <span>// 字符集</span><span>'DB_DEBUG'</span>  =>  <span>TRUE</span>, <span>// 数据库调试模式 开启后可以记录SQL日志 3.2.3新增</span></code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the ThinkPHP framework configuration, including aspects of the 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!