Fatal error: Smarty error: [in rezultati/index.tpl line 24]: syntax error: $smarty. is an unknown reference (Smarty_Compiler.class.php, line 2164) in D:\HTTPSERVER\wwwroot\kajak\sistem\smarty\libs\Smarty.class.php on line 1093
{assign var="file" value="{$smarty.const.CMS_URL_POT}/modul
我在控制器类中创建了一个函数,需要在模板中使用(因为它多次呈现模板(每个模板都是网站上的一个帖子,它们都将以不同的值在新闻提要中显示)。有什么办法叫它智能变量吗?假设您在控制器中创建了一个函数:
public function foo($bar){
$bar++;
return $bar;
}
然后在模板中:
{$smarbar|foo}或类似的东西
我在admin.php中有一个简单的PHP函数
function accountMenu()
{
if (isset($_SESSION['user_id']))
{ ?>
<a href="update_profile.php">Update My Profile</a><br>
<a href="update_email.php">Update My E-mail Address</a><br>
<a