PHPTAL - 未指定模板文件

发布于 2024-10-03 22:25:49 字数 563 浏览 0 评论 0原文

我有一个在两台不同服务器上运行的相同站点,由于某种原因,当我登录或注销该站点上的 CMS 时,其中一台服务器上出现以下错误消息。

PHPTAL Exception

No template file specified

In /usr/share/pear/PHPTAL.php line 1138

#0 /usr/share/pear/PHPTAL.php(801): PHPTAL->findTemplate()
#1 /usr/share/pear/PHPTAL.php(821): PHPTAL->setCodeFile()
#2 /usr/share/pear/PHPTAL.php(667): PHPTAL->prepare()
#3 /var/www/html/example.co.uk/main.php(318): PHPTAL->execute()
#4 /var/www/html/example.co.uk/main.php(2746): main->tal()
#5 {main}

知道是什么原因造成的吗?我不熟悉 PHPTAL,我只是想将网站迁移到新服务器。

谢谢!

I have an identical site running on two different servers, and for some reason I am presented with the following error message on one of the servers when I either login or logout of the CMS on the site.

PHPTAL Exception

No template file specified

In /usr/share/pear/PHPTAL.php line 1138

#0 /usr/share/pear/PHPTAL.php(801): PHPTAL->findTemplate()
#1 /usr/share/pear/PHPTAL.php(821): PHPTAL->setCodeFile()
#2 /usr/share/pear/PHPTAL.php(667): PHPTAL->prepare()
#3 /var/www/html/example.co.uk/main.php(318): PHPTAL->execute()
#4 /var/www/html/example.co.uk/main.php(2746): main->tal()
#5 {main}

Any idea what could be causing it? I'm not familiar with PHPTAL, I am just trying to migrate the site to a new server.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

紧拥背影 2024-10-10 22:25:49

也许您需要检查CMS中模板的路径

Maybe you need check the path of the template in the CMS

梦在夏天 2024-10-10 22:25:49

这意味着您将 NULL 参数传递给 PHPTAL 构造函数而不是模板路径,和/或没有调用 setTemplate()setSource()

检查应用程序中选择应输出哪个模板的逻辑(也许它取决于服务器之间不同的应用程序配置?)

It means that you passed NULL argument to PHPTAL constructor instead of template path, and/or haven't called setTemplate() nor setSource().

Check logic in your application that selects which template should be output (maybe it's dependent on app configuration that differs between servers?)

ぽ尐不点ル 2024-10-10 22:25:49

使用 getTemplateRepositories() 方法在呈现模板文件的行(例如 display())之前对模板存储库执行 var_dump。

如果您在某处正确设置了它,它将打印出您当前的模板存储库路径。您的模板文件路径应该相对于模板存储库路径。

Do a var_dump of the template repositories before the line that renders the template file (e.g. display()) by using the getTemplateRepositories() method.

It will print out your current template repositories path if you've properly set it somewhere. Your template file path should be relative to the template repositories path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文