我发现了此错误
类型:ArgumentCountError
消息:函数KeluhanMav :: tangani()的参数太少,在第532行的/opt/lampp/htdocs/cctv/system/core/CodeIgniter.php中传递了0,并且恰好期望1
如何解决?
我的控制器
public function tangani($id_keluhan)
{
$data['jeniskeluhan']=$this->Keluhanmav_model->getJenisKeluhan();
$data['data_keluhan']=$this->Keluhanmav_model->showKeluhan();
$data['get_camera']=$this->Keluhanmav_model->getCameraById($id_camera);
$data['get_keluhan']=$this->Keluhanmav_model->getKeluhanById($id_keluhan);
$this->load->helper(array('form','url'));
// var_dump($data['get_camera']);
// $this->form_validation->set_rules('tgl_keluhan', 'tgl_keluhan', 'trim|required');
// $this->form_validation->set_rules('id_jeniskeluhan', 'id_jeniskeluhan', 'trim|required');
// $this->form_validation->set_rules('isi_keluhan', 'isi_keluhan', 'trim|required');
if($this->form_validation->run()==FALSE){
$this->load->view('header/headermav', $data);
$this->load->view('keluhan/tangani_keluhan', $data);
$this->load->view('footer/footer', $data);
}else{
$this->Keluhan_model->editKeluhan($id_keluhan);
redirect('HomeMav','refresh');
}
}
答案 0 :(得分:0)
无论调用此函数是什么,您都希望传递参数$id_keluhan
,但没有将其传递给该函数。