1
顯示方法不能正常工作打印「kamal」不打印「maisuriya」在Smarty顯示方法不起作用
請幫幫我嗎?
print("kamal");
$tpl->display('default_layout'. $config['tplEx']);
print("Maisuriya");
顯示方法不能正常工作打印「kamal」不打印「maisuriya」在Smarty顯示方法不起作用
請幫幫我嗎?
print("kamal");
$tpl->display('default_layout'. $config['tplEx']);
print("Maisuriya");
如果你沒有看到任何錯誤訊息,您可能希望與ini_set("display_errors", true); error_reporting(E_ALL);
如果您使用Smarty3運行$tpl->testInstall();
後,你已經設置的Smarty,看是否要激活它們(暫時)一切都好。然後檢查您的模板是否存在$tpl->templateExists('default_layout'. $config['tplEx']);
我的猜測是所請求的文件不存在,或者模板包含語法錯誤,或者模板中調用的某些函數未正確執行。但沒有錯誤信息,我不知道。
'$ tpl-> display'調用失敗了嗎?有沒有錯誤輸出? – spraff