在 Yii 框架中使用 sql 服务器数据库时出错


Getting error with sql server database in Yii framework

我正在从mysql数据库切换到sql服务器。新数据库与以前的数据库相同。但是在创建用户操作中,我遇到了这种类型的错误。

include( .php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

谁能建议我能做些什么来解决这个问题?

问题显示在此行上

$profile->attributes = $_POST['YumProfile'];

从代码中检查了所有对象是否正常工作,并且我正确获得了$_POST['YumProfile']值。

实际上,此逻辑与其他user表和值一起正常工作,并且正在插入值,但是当我尝试将带有表单的数据插入profile表中时,它会显示这种类型的错误。从输入来看一切正常,但我不明白为什么

 $profile->attributes = $_POST['YumProfile'];

这条线甚至profile->validate()给出错误,profile->save()$profile->attributes$_POST['YumProfile']正常工作并填充正确值时也给出此错误。

模型的验证规则似乎有问题。检查那里是否一切都到位,可能你错过了什么。这是一个 api 文档

相关文章: