簡體   English   中英

在php / mysql查詢中分配smarty變量

[英]assign smarty variable in php / mysql query

我正在phpfox中工作。我想在mysql查詢中使用smarty變量。 我已經搜索了很多,並應用了stackoverflow中可用的所有方法/解決方案,但是它不起作用。

使用get_template_vars在php代碼中獲取模板變量

$myVar = $smarty->get_template_vars('aPin');
echo $myVar.ITEMID;

也可以嘗試使用get_template_vars()獲取所有已分配變量的列表

$myvar = $smarty->get_template_vars();
print_r($myvar);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM