|
这是视图代码
<a href=".../hotelinfo/hotelinfo_a/<?=$row->HotelsId?>" target="_blank"><?=$row->HotelsName?></a>
这是控制器代码
function hotelinfo_a($id){
$this->load->model('hotelinfo_m','$id');
$data['query'] = $this->$id->get_Hotelinfo(); //11行
$this->load->view('hotelinfo_v',$data);
}
这是模型代码
function get_Hotelinfo($id){
$query = $this->db->query("select * from guanchengqu where HotelsId=$id");
return $query->result();
}
然后问题是
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Hotelinfo:1
Filename: controllers/hotelinfo.php
Line Number: 11
主要是想通过控制器把视图里获得的值传到模型里去 |
|