Home > Backend Development > PHP Tutorial > After struggling for a long time, I finally completed the grouping of Thinkphp modules.

After struggling for a long time, I finally completed the grouping of Thinkphp modules.

WBOY
Release: 2016-08-08 09:32:19
Original
952 people have browsed it

I use the THinkphp3.1 series

1. Write the entry file and access the entry file. The content of the entry file is:

//Define the project name
define('APP_NAME', 'App');
//Define the project path
define('APP_PATH', './App/');
// Turn on debugging mode
Define('APP_DEBUG', true);
set_time_limit(0);
require_once './include/ThinkPHP.php';

2. A folder named App is generated with several files in it folder, I chose to keep all, and created a folder named Modules (Modules here is the default in the Thinkphp configuration file and can be modified), and then created two folders, Home and Admin, under this folder. There are three folders Action, Model, and Tpl under both folders.

3. Here comes the highlight: Configure it in the App/conf/config.php file. If you don’t configure it, it will be invalid. The key configuration is:

        'URL_MODEL'                                                                                                                                                                                                                                       UP_MODE' => 1,

4. Visit: http://localhost/test/index.php/Home/Index/index, http://localhost/test/index.php/Admin/Index/index (the App folder is in the test folder)

I wanted to use the Thinkphp3.2 series version to regroup the modules, but since the PHP version installed on my computer is too low, I will post the installation process next time...

The above introduces the grouping of Thinkphp modules after struggling for a long time, including the relevant 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