在 DedeCMS V5.7 中,系統預設僅支援 .htm 副檔名的模板檔案。若您嘗試使用 .html 作為模板副檔名,系統將無法正確識別,導致模板調用失敗。
請開啟 /include/arc.archives.class.php 檔案,找到 GetTemPleteFile() 函數(約第 556 行),將其中的正則判斷條件修改如下:
// 原始碼
if (!preg_match("#.htm$#", $tmpfile)) return FALSE;
// 修改為
if (!preg_match("#.html?$#", $tmpfile)) return FALSE;
修改完成後儲存檔案,系統即可同時支援 .htm 與 .html 兩種模板副檔名。