First open the editor sublime.
Then find the config file in the application directory.
Related recommendations: "ThinkPHP Tutorial"
Select a configuration parameter at random, for example, we want to read the configuration parameter app_namespace.
Come to the controller.
Create a new method test2 in the controller.
In the method, we use the config ("configuration parameters") format to output the configured parameter values.
Enter the url address in the browser to access.
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!