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

How thinkphp5 reads configuration file data

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-23 11:11:215252browse

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!

Statement:
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