Home > PHP Framework > ThinkPHP > Introducing the simple configuration of the backend of thinkphp5.0

Introducing the simple configuration of the backend of thinkphp5.0

藏色散人
Release: 2021-05-25 09:17:03
forward
2818 people have browsed it

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
Copy after login

-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!

Related labels:
source:csdn.net
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