Home > Article > PHP Framework > Introducing the simple configuration of the backend of thinkphp5.0
The following thinkphp framework tutorial column will introduce you to the simple configuration of the backend of thinkphp5.0. I hope it will be helpful to friends in need!
I have been directly exposed to tp5.0 since I started working. I added my own outsourcing projects in one year, and made about 10 projects, large and small. Now I have also developed projects with laravel5.5 for a year, and suddenly I want to summarize the knowledge I have learned before. My blog is just based on my own coding habits. Not everyone may benefit from it. Don’t talk nonsense, let’s start it right away!
1.composer Install the latest version of tp5 (local composer installation, go to the official website https://www.phpcomposer.com/ to install it yourself)
composer create-project topthink/think=5.0.* learn -vvv
-vvv can be more friendly Display the loading status of the packaging package
2.common.php public file, where public constants and methods can be defined, and global variables can be referenced in any area of the frameBackground css and js For application resources, you can use the configured constant PUBLIC_PATH or ADMIN_PATH, such as
. Of course, there is another way to configure parameters in the configuration file config.php (I don’t like this method, the previous configuration is recommended)
Command line to create a controller: Create Base.php controller
php think make:controller app\admin \controller\Base
The above is the detailed content of Introducing the simple configuration of the backend of thinkphp5.0. For more information, please follow other related articles on the PHP Chinese website!