无法在zend数据库中插入记录?
我正在使用以下教程:
http://framework.zend.com /manual/en/learning.quickstart.create-model.html
当我尝试在数据库中插入记录时,如下所示:
$userModel = new Model_User_Object();
$userModel->setFirstName( 'FirstName' );
$userModel->setLastName( 'LastName' );
$userModel->save();
我收到以下错误:
No entry is registered for key 'Logger'
谢谢
I am using following tutorial:
http://framework.zend.com/manual/en/learning.quickstart.create-model.html
When I try to insert record in database something like this:
$userModel = new Model_User_Object();
$userModel->setFirstName( 'FirstName' );
$userModel->setLastName( 'LastName' );
$userModel->save();
I am getting following error:
No entry is registered for key 'Logger'
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您尝试
get()
未注册的索引时,Zend_Registry
通常会抛出此错误。我想在你的模型中你正在做类似Zend_Registry::get('Logger');
的事情?您是否已经在注册表中注册了“Logger”?This error is usually thrown by
Zend_Registry
when you try toget()
an index that is not registered. I guess in your model you're doing something likeZend_Registry::get('Logger');
? Have you already registered 'Logger' in the registry?