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.
将应用程序部署到生产环境并在包含对渲染函数的调用的视图上遇到以下错误:
致命错误:重载“渲染”没有匹配功能
示例 /fuel/app/views/profile.php:
echo render('_validation');
渲染在 /fuel/core/classes/view.php 中定义。自动加载器应该可以使用它。
关于可能导致这种情况的环境问题的想法?
编辑: APPPATH 和 COREPATH 都保存正确的文件路径
尝试使用更清晰的函数名称,这样您就不会在使用标准 PHP 函数时遇到麻烦。
看起来您的渲染函数是在类中声明的,如果是这样,您必须初始化该类的对象或使用现有对象来调用该方法
echo $object->render('_validation');
不确定这是否是 5.3.3 的特定问题,但我们只是在应用程序中将 render() 更改为 View::forge() ,一切都很好。