CakePHP:每个控制器都需要数据库表吗?
我是 CakePHP 的新手,但遇到了奇怪的错误。我只是测试它,如何实现许多功能并得到奇怪的错误。我创建了一个名为 about
的控制器,但出现以下错误:
Error: Database table abouts for model About was not found.
Does CakePHP require to have DB table for every singlecontroller?
var $useTable = false;
不起作用。
我正在使用 CakePHP 1.2.5
I'm a newbie to CakePHP but got strange error. I'm just testing it, how to implement many functions and got strange error. I have created a controller called about
and got the following error:
Error: Database table abouts for model About was not found.
Does CakePHP require to have DB table for every single controller?
var $useTable = false;
is not working.
I am using CakePHP 1.2.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试在您的控制器中使用此
$usesTable = false
习惯用法在没有关联表的模型中使用。Try using this in your controller
The
$usesTable = false
idiom is used in models that don't have associated tables.您应该将 about 方法添加到主应用程序控制器中
you should add about method to your main application controller