There is another important knowledge point in the process of learning to load configuration files, which is Yaconf, which will be introduced below. Learning how to use yaconf will be of great help in learning the source code in the framework later.
3. Understand Yaconf
I guess some students know that Yaconf is our awesome Klass bird Written by my brother.
After Kaka learned about Yaconf, he summarized several reasons for launching this open source.
There are too many configuration files, resulting in too long loading time The configuration files are poorly readable and need to be parsed Configuration files and code belong to the same project and there will be security risks when deployed together. At the same time, if the configuration file is modified, an online process is required. Increase collaboration between operation and maintenance and development Difficulty, if operation and maintenance needs to modify MySQL or other configurations, development needs to be notified to make simultaneous modifications
Then let’s talk about the advantages of using Yaconf
Not together with the code, use a dedicated configuration directory When PHP starts, all configurations are loaded and resident in memory, accompanied by PHP Life cycle survival, avoiding the time-consuming process of parsing the configuration file for each request Separate the configuration file from the code, you can use the configuration background management to uniformly manage the configuration information If the configuration file changes, it will be reloaded (the suggestion given here is to use mv instead of cp) Supports rich types, such as: string , array, section, and you can also use PHP environment variables and constants directly in the PHP configuration file The last point is that it is very simple to use
After understanding what Yaconf can do, start the next step. Don't just install, configure, and call it. Then after the operation is over, you don't know what it is for. It doesn't make any sense. .
The following will introduce how to install and use it on win and linux
Persistence in learning, persistence in blogging, and persistence in sharing are the beliefs that Kaka has always upheld since his career. I hope that Kaka’s articles on the huge Internet can bring you a little bit of help. I’m Kaka, see you next time.
The above is the detailed content of It's time to learn about Yaconf. 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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools
