首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >smarty php CMS错误

smarty php CMS错误
EN

Stack Overflow用户
提问于 2009-08-03 06:18:16
回答 3查看 386关注 0票数 0

嗨,当我打开我的网站(在smarty中制作)时,我得到了这个错误,请解决我在smarty中非常新的问题

Smarty错误:无法在1083行的/var/www/vhosts/example.com/htdocs/includes/smarty/Smarty.class.php中读取资源:“pagetemplate.tpl

警告: Smarty错误:无法读取1083行/var/www/vhosts/example.com/htdocs/includes/smarty/Smarty.class.php中的资源:“pagetemplate.tpl

谢谢

EN

回答 3

Stack Overflow用户

发布于 2009-08-03 06:30:50

是否将模板目录设置为模板文件所在的位置?

代码语言:javascript
复制
$smarty->template_dir = ...
票数 2
EN

Stack Overflow用户

发布于 2009-08-03 06:31:15

显然,Smarty没有找到"pagetemplate.tpl“文件。

有两个想法:

  • 该文件是否真的存在?(如果你是在Linux下,文件名区分大小写:"PageTemplate.tpl“和"pagetemplate.tpl”不是同一个文件。
  • 是否正确设置了smarty的$template_dir?它是否指向正确的方向?(区分大小写也一样,顺便说一句)
  • 和第三个:你对那个文件/目录有读访问权限吗?

在此期间,您可能还希望检查$compile_dir变量。

票数 2
EN

Stack Overflow用户

发布于 2009-08-03 06:31:09

您可能需要检查以下几点:

  • 您是否正确配置了

的初始设置?

代码:

代码语言:javascript
复制
$smarty->template_dir = '/path/to/templates_dir';
$smarty->compile_dir = '/path/to/compile_dir';
$smarty->cache_dir = '/path/to/cache_dir';

$smarty->template_dir中是否存在

  • pagetemplate.tpl
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1220867

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档