Thinkphp5 Modify the default program entry

Thinkphp5 is different from the previous version, the introduced namespace. And there is also a change in the directory of the file.

Project Application Deployment Directory

├─composer.json composer definition file

├-Readme.md readme file

├ ─Build.php Automatic Generation Definition File (Reference)

├LICense.txt Authorized Notes

├─Application Application Directory (Settings)

│ ├-common Public module directory (can be changed)

─Runtime application runtime directory (writable, setup)

│ ├─Module module directory

│ │ ├ ─config.php module configuration file

│ │ ├─common.php module function file

│ │ ├─Controller controller directory

│ │ ├─model model catalog

│ │ ─View View Directory

│ │ ├─ … More Category Library

│ ├─Common.php Public Function File

│ ├ROUTE.PHP Route Profile

│ ├─Database.php database configuration file

│ └─config.phpPublic profile

├─Public web deployment directory (external access directory)

│ ├DEX.PHP application entry file

│ ├taccess for Apache Rewrite

│ └─Router.php Quick test file (for bringing Webserver)

├─thinkPHP Framework System Directory

│ ├─Library Framework library directory

│ │ ├─Behavior behavioral library directory

│ │ ─tink think library package directory

│ │ ├─ORG ORG class library package directory

│ ─Traits System Traits Directory

│ │ ├─ … More Category Libraries

│ ├─Extend Extension Category Library (Custom)

│ ├─vendor third-party library directory

│ ├─mode application mode directory

│ ├─TPL system template directory

│ ├─Base. PHP basic file

│ ├─convention.php framework formula

│ └─start.php frame boot file

can be modified ApplicatThe config.php file under ION will change the program’s entry file.

Config.php

The annotation in the file is clear. Just there are some attention to it, the location of the default module in the program is Application. Say to place the template file under the Application file if you want to modify the default module. Of course, this location can be changed.

What to note here is that the controllers and operands you specify are. Because of the reasons for named space. ThinkPHP5修改默认的程序入口

These two locations need to correspond to the controllers and operands in config.php. The class name must be the same as the file name.

ThinkPHP5修改默认的程序入口

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment