![](/img/trans.png)
[英]How to fix error “Fatal error: Uncaught --> Smarty: unable to write file”?
[英]How to clear fatal error in smarty template file?
我正在使用聰明的變量$r = 1;
$c = 2;
{$name['1-$r-$c']}
但卻顯示出致命錯誤。 如何解決這個問題?
Smarty模板不會計算單引號內的變量。 如果您使用雙引號這樣:
{$name["1-$r-$c"]}
您的計算應該會起作用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.