严重性:警告 消息:控制器/ 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