在智能模板文件(.tpl)中,使用此代码获取控制器名称.
{* Example URL Example.com/index.php?id_category=4&controller=category}
{assign var='controllerName' value=$smarty.get.controller}
{$controllerName}
Run Code Online (Sandbox Code Playgroud)
要么
{$smarty.get.controller}
Run Code Online (Sandbox Code Playgroud)
Smarty 保留了变量
| 归档时间: |
|
| 查看次数: |
19824 次 |
| 最近记录: |