Ing Analysis of Common Function paths and configuration item paths in ThinkPHP, thinkphp Functions
This article analyzes the ing between common function paths and configuration item paths in ThinkPHP. Share it with you for your reference. The specific analysis is as follows:
When using public functions in ThinkPHP (a single entry file corresponds to an independent project), you can write a public function file in the Common folder and write the file name as common. php files are automatically loaded by the system. If they are written as other function names, they are not automatically loaded, but there are two processing mechanisms.
1. Manually load the file ('@. function') when using it. In this way, the file will be manually loaded. @ Indicates that it is in the Common folder under this project.
2. Configure in the configuration fileCopy codeThe Code is as follows: 'Load _ EXT_FILE '=> 'function'
In ThinkPHP, _ PUBLICC _ is not a constant but a ing. It is the Public directory under the root directory by default and can be modified in the configuration file,Copy codeThe Code is as follows: 'tmpl _ PARSE_STRING '=> _ ROOT _. 'public'
I hope this article will help you with ThinkPHP framework programming.