|
C:
function index()
{
$query = $this->db->query("SELECT * FROM tb_websysop");
if ($query->num_rows() > 0)
{
$row = $query->row();
$data = $row->w_title;
}
$this->load->view('welcome_message',$data);
}
v:
<h1><? echo $data['$w_title'];?></h1>
請問一下一直出現 錯誤
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: data
Filename: views/welcome_message.php
Line Number: 46
我只要顯示單筆 ~~~
view 輸出到$data 出了什麼問題呢 |
|