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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses key considerations for using ThinkPHP in serverless architectures, focusing on performance optimization, stateless design, and security. It highlights benefits like cost efficiency and scalability, but also addresses challenges

ThinkPHP's IoC container offers advanced features like lazy loading, contextual binding, and method injection for efficient dependency management in PHP apps.Character count: 159

The article discusses preventing SQL injection vulnerabilities in ThinkPHP through parameterized queries, avoiding raw SQL, using ORM, regular updates, and proper error handling. It also covers best practices for securing database queries and validat

The article discusses ThinkPHP's built-in testing framework, highlighting its key features like unit and integration testing, and how it enhances application reliability through early bug detection and improved code quality.

The article outlines building a distributed task queue system using ThinkPHP and RabbitMQ, focusing on installation, configuration, task management, and scalability. Key issues include ensuring high availability, avoiding common pitfalls like imprope

The article discusses key differences between ThinkPHP 5 and 6, focusing on architecture, features, performance, and suitability for legacy upgrades. ThinkPHP 5 is recommended for traditional projects and legacy systems, while ThinkPHP 6 suits new pr

The article discusses best practices for handling file uploads and integrating cloud storage in ThinkPHP, focusing on security, efficiency, and scalability.

The article discusses implementing service discovery and load balancing in ThinkPHP microservices, focusing on setup, best practices, integration methods, and recommended tools.[159 characters]
