爲什麼在我測試/ nl/nl/address時,smarty變量在我的代碼中沒有價值?空smarty變量?
代碼:
{php}
global $country; global $lang;
$this->assign('curLang',$lang);
$this->assign('curCountry',$country);
{/php}
{if $curLang == "nl" && ($curCountry == "nl" || $curCountry == "be")}
{literal}
javascript code
{/literal}
{assign name="test" value="1"}
{/if}
{$curCountry} <!-- nl -->
{$curLang} <!-- nl -->
{$test} <!-- Empty value -->
也許你如果不執行的語句... – gskema 2014-10-27 18:21:47
@GytisŠk我編輯我的帖子。奇怪的行爲 – user3105439 2014-10-27 18:33:57