嚴重性:警告 消息:控制器/ person.php 線數::從空值 文件名創建默認對象133笨,錯誤消息:從空值創建默認對象
function update($id)
{
$responce = new StdClass;
$this->_set_rules();
$person = $this->Person_model->get_by_id($id)->row();
error in this line i try to figure it ot
$this->form_data->id = $id;
$this->form_data->name = $person->name;
$this->form_data->gender = strtoupper($person->gender);
$this->form_data->dob = date('d-m-Y',strtotime($person->dob));
$data['title'] = 'Update person';
$data['message'] = '';
$data['action'] = site_url('person/updatePerson');
$data['link_back'] = anchor('person/index/','Back to list of persons',array('class'=>'back'));
// load view
$this->load->view('personEdit', $data);
}
什麼是錯誤? – 2015-02-10 17:56:38
從空值創建默認對象 – Keyvin 2015-02-11 14:17:28
如果你喜歡我的回答,請考慮「up-vote」 – 2015-02-11 14:25:35