我收到上述錯誤,而我試圖想從我的媒體庫訪問功能顯示在...笨:致命錯誤:調用一個成員函數select()的非對象
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class My_crud {
public function select_from($select, $from) {
// dafaults
$output = "";
// querying
$this->db->select($select);
$this->db->from($from);
$query = $this->db->get();
// if no rows returned
if ($uqery->num_rows == 0) {
return $output = "No Results Found";
}
// if row(s) retunred
return $output = $query->result_array();
}
}
而database
庫設置爲自動加載。
擴展類後,我得到這個錯誤''致命錯誤:類'CI_model'找不到'' – 2013-04-09 02:11:54
看看[文檔](http://ellislab.com/codeigniter/user-guide/ general/models.html)並檢查您的大小寫。 – 2013-04-09 02:27:54