Home > PHP Framework > ThinkPHP > How thinkphp5 reads configuration file data

How thinkphp5 reads configuration file data

爱喝马黛茶的安东尼
Release: 2019-08-23 11:11:21
Original
5254 people have browsed it

How thinkphp5 reads configuration file data

First open the editor sublime.

How thinkphp5 reads configuration file data

Then find the config file in the application directory.

How thinkphp5 reads configuration file data

Related recommendations: "ThinkPHP Tutorial"

Select a configuration parameter at random, for example, we want to read the configuration parameter app_namespace.

How thinkphp5 reads configuration file data

Come to the controller.

How thinkphp5 reads configuration file data

Create a new method test2 in the controller.

How thinkphp5 reads configuration file data

In the method, we use the config ("configuration parameters") format to output the configured parameter values.

How thinkphp5 reads configuration file data

Enter the url address in the browser to access.

How thinkphp5 reads configuration file data

The above is the detailed content of How thinkphp5 reads configuration file data. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
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