|
1、
$autoload['model'] = array('siteinfo');
2、
在application/models/siteinfomodel.php
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Siteinfomodel extends CI_Model{
function __construct(){
parent::__construct();
}
//获取站点信息
function getsiteinfo(){
$sql = "SELECT * FROM le_system WHERE 1";
$info = $this->db->result_array();
return $info;
}
}
?>
报:Unable to locate the model you have specified: siteinfo
这是个获取站点基本信息的model ,很多地方都需用到! 不知道该使用?
|
|