Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在调用我在 symfony 1.2 中创建的库的方法。如果我不调用 action 方法中的库方法,那么 action 类中的方法会正常工作,它会找到模板。但是,如果我在动作类中调用库方法,symfony 会告诉我它找不到与动作方法关联的模板。有什么建议么?
您是否尝试在操作代码上返回 sfView::NONE ?
返回 sfView::NONE 是告诉 Symfony 什么都不显示。显式返回值听起来像是正确的方法,但您可能想要:
return sfView::SUCCESS;