我在employee_controller.php文件中有控制器类EmployeeController,我在employee.php中有一个模型类Employee,数据库表是员工,所有函数都正常工作(比如findall()和read()工作正常),但我有添加功能,就像这样
function add() {
if (!empty($this->data)) {
if ($this->Employee->save($this->data)) {
$this->Session->setFlash('Employee has been saved.');
$this->redirect(array('action' => 'index'));
}
Run Code Online (Sandbox Code Playgroud)
当我试图保存时,将找不到找不到EmployeesController的错误并显示以下代码
<?php
class EmployeesController extends AppController {
var $name = 'Employees';
}
?>
Run Code Online (Sandbox Code Playgroud)
我无法解决这个问题,请帮我解决这个问题
cakephp ×1