1
第一次使用smarty所以請不要邪惡.. 希望有人能幫助我解決這個問題。 我在page.tpl以下代碼:Smarty if語句
{$user-status}
{if $user-status == '-'}
<h1>OK</h1>
{/if}
當加載頁面時,我看到
"user-status-string" // this is correct
{if $user-status == '-'}
<h1>OK</h1>
{/if}
它顯示正是我所編寫的代碼,但上面顯示了正確的變量屬性。 有人知道我做錯了什麼嗎?
謝謝
謝謝,但仍然無法正常工作:( – ianaz 2012-07-18 08:02:14
緩存文件看起來正確。嘗試{if'a'eq'b'} {/ if}: In cache <?php if('a'=='b '){?> } ?> 和生成的HTML我看到{if'a'eq'b'} {/ if} !!! 究竟是什麼?! – ianaz 2012-07-18 08:05:54
也許檢查您的編譯/緩存目錄位置? smarty-> getCompileDir()'和'$ smarty-> getCacheDir()') – 2012-07-18 09:43:57