thinkphp3.1 and 3.2 <template replacement> difference

3.1

../Public : will be replaced with the current project of a common template directory is usually / project directory / Tpl / Current Topic / Public /
__TMPL__ : replace the template directory into the project usually / project directory / Tpl / Current Topic /
(Note : in order to deploy security reasons, .. / public and __TMPL__ no longer recommended)
__PUBLIC__ : will be replaced with a public directory of the current web site is usually / public /
__ROOT__ : will be replaced with the address (without the domain name of the current site)
__APP__ : the current project will be replaced with the URL address (domain)
__GROUP__ : will be replaced with the URL of the current packet (excluding domain name)
the __URL__ : will be replaced with the URL (without the domain name) of the current module
__ACTION__ : will be replaced with current URL address (domain) operation
__SELF__ : will be replaced with the current page URL

3.2

__ROOT__: 会替换成当前网站的地址(不含域名) 
__APP__: 会替换成当前应用的URL地址 (不含域名)
__MODULE__:会替换成当前模块的URL地址 (不含域名)
__CONTROLLER__(__或者__URL__ 兼容考虑): 会替换成当前控制器的URL地址(不含域名)
__ACTION__:会替换成当前操作的URL地址 (不含域名)
__SELF__: 会替换成当前的页面URL
__PUBLIC__:会被替换成当前网站的公共目录 通常是 /Public

Guess you like

Origin www.cnblogs.com/xm666/p/11578174.html