1
我在从Phalcon 2.0.x迁移到3.1.1时遇到问题 - 当我尝试使用Volt编译模板时,返回的输出为空。更有意思的是,正确解析的模板(即不是空的)被存储在缓存文件夹中,但不会被返回。下面是我的代码片段:Phalcon 3缓存解析模板但不返回
$this->templateEngine->getView()->setVars($params);
$this->templateEngine->getView()->start();
$this->templateEngine->getView()->render(
$this->compiler->getOption('compiledPath'),
basename($compiledTemplateFile, $this->compiler->getOption('compiledExtension'))
);
$this->templateEngine->getView()->finish();
return $this->templateEngine->getView()->getContent();
相同的代码工作中尔康2.0,在PHP运行25年6月5日(PHP版本没有发生变化,只是用PhalconPHP的新编译的版本)。不显示错误,也不记录在错误日志中。我接受建议,包括如果Phalcon遇到错误,如何调试,这就是为什么它不返回输出。
谢谢,但(或更确切地说,类似的方法render()方法)似乎并不适用于我:( –