[英]How can I access a variable defined in the parent template in PHP smarty?
[英]How Can I get the variable from Smarty 3 template to the PHP?
在php文件中,使用Smarty 3函數getTemplateVars() :
$MyGetVar = $this->Smarty->getTemplateVars('smarty_variable_in_template');
您的意思是將變量從php傳遞到模板嗎?
$this->Smarty->assign('variablename', 'value');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.