我尝试了针对此问题的所有建议解决方案,即清除缓存文件夹。我还禁用了缓存Configure::write('Cache.disable', true);
我的调试级别设置为 2。但我总是得到同样的错误。缺少的表只是新添加的表。顺便说一句,我只在我的本地主机中运行。这是我的模型,名为 Department.php
<?php
class Department extends AppModel {
public $name = 'Department';
}
?>
这是我的控制器名称 DepartmentsController.php
<?php
class DepartmentsController extends AppController {
public $name = 'Departments';
public $helpers = array('Html', 'Form','Session');
public $components = array('RequestHandler','Session');
function index() {
$this->Department->recursive = 0;
$this->set('departments', $this->paginate());
}
}
?>
提前谢谢你的回答!:D