2009-08-03 39 views
0

喜當我打開我的網站(在智者製造)我得到這個錯誤PLZ決心IM在智者Smarty的PHP CMS錯誤

Smarty的錯誤很新:無法讀取資源:在/ var「pagetemplate.tpl」/www/vhosts/example.com/htdocs/includes/smarty/Smarty.class.php on line 1083

警告:Smarty錯誤:無法讀取資源:「pagetemplate.tpl」in/var/www/vhosts/example .COM/htdocs中/包括/智者/ Smarty.class.php上線1083

感謝

回答

2

你設置你的T emplate目錄到模板文件的位置?

$smarty->template_dir = ... 
+0

非常感謝它現在正在工作 – webkul 2009-08-03 07:01:09

+1

因此給予Zed的答案。31個問題,而不是一個選定的一個nswer也沒有upvote。 – 2009-08-03 07:48:21

0

有你可能要檢查的幾件事情:

  • 你正確配置Smarty的初始設置爲這樣?

CODE:

$smarty->template_dir = '/path/to/templates_dir'; 
$smarty->compile_dir = '/path/to/compile_dir'; 
$smarty->cache_dir = '/path/to/cache_dir'; 
  • 是否pagetemplate.tpl$smarty->template_dir存在嗎?
+0

什麼是我可以更改文件的路徑 – webkul 2009-08-03 06:49:03

1

Smarty明顯沒有找到「pagetemplate.tpl」文件。

兩個想法:

  • 是否確實的文件存在? (如果你在Linux下,文件名區分大小寫:「PageTemplate.tpl」和「pagetemplate.tpl」不會是同一個文件。
  • Smarty的$template_dir是否正確設置?是否指向正確的directoy?關於區分大小寫,順便說一句)
  • 還有第三件事:你有讀訪問該文件/目錄

當你在這,你可能還需要檢查$compile_dir變量?