我打算创建一个处理联系页面的控制器。我创建了控制器ContactsController。问题是它要求一张同名的表格:CakePHP需要一个数据库表
Missing Database Table
Error: Database table username_contacts for model Contact was not found.
Notice: If you want to customize this error message, create app/views/errors/missing_table.ctp
我真的需要创建一个没有数据的表吗?
这是我的控制器代码:
<?php
class ContactsController extends AppController {
var $name = 'Contacts';
function index($id = null)
{
$this->set('page', ClassRegistry::init('Page')->findByShortname($id));
}
}
没有问题的亚当。我也认为这将被记录。 – 2010-02-03 01:11:58