Symfony:执行include_component()后的空白页

时间:2010-04-17 20:10:22

标签: symfony1

我在模板中只有这一行:

<?php include_component('sfGuardRegister', 'register') ?>

当它被执行时,我得到一个空白页面。我调试了include_component()并且流程处理没有进入其中,我的意思是:

function include_component($moduleName, $componentName, $vars = array())
{

  die("enter");
  echo get_component($moduleName, $componentName, $vars);
}

有什么想法吗?

2 个答案:

答案 0 :(得分:0)

你加载了PartialHelper吗?

sfContext::getInstance()->getConfiguration()->loadHelper('Partial');

答案 1 :(得分:0)

如果您在生产环境(index.php)中,空白页面将显示错误。更改为开发环境(frontend_dev.php),它会告诉您存在问题的原因。

我敢打赌你没有在setting.yml中启用sfGuardRegister:

all:
  enabled_modules:      [.... , sfGuardRegister]
相关问题