Template substitution
Before the template output, the system will also do some template of the rendered template results of a special string substitution operation, that is, the implementation of template output substitution and filtering. Template substitution applies to all template engines, including native PHP templates. This mechanism can make the template file definition more convenient, the default substitution rules are:
.. /public: The public template directory that will be replaced with the current project is usually/project directory/tpl/current topic/public/
__tmpl__: The template directory that will be replaced with the project is usually/project directory/tpl/Current topic/(Note: In order to deploy security considerations, the. /public and __tmpl__ no longer recommended)
__public__: The public directory that will be replaced with the current site is usually/public/
__root__: Will replace the address of the current website (without the domain name)
__app__: Will replace the URL address of the current project (without the domain name)
__group__: Will replace the URL address of the current group (without the domain name)
__url__: Will replace the URL address of the current module (without the domain name)
__action__: Will replace the URL address of the current operation (without the domain name)
__self__: Will replace the current page URL
thinphp Template Replacement