开发者

CakePHP: Need DB table for every controller?

开发者 https://www.devze.com 2022-12-16 10:15 出处:网络
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:

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


Try using this in your controller

var $uses = array();

The $usesTable = false idiom is used in models that don't have associated tables.


you should add about method to your main application controller

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号