Fatal error: Call to undefined method MProducts::getMainFea...
本帖最后由 228点六 于 2014-2-25 21:21 编辑按照《professional codeigniter》按部就班的做下来,结果出了个这样的问题,为什么会有一个未定义的方法?难道是版本问题?
( ! ) Fatal error: Call to undefined method MProducts::getMainFeature() in C:\wamp\www\CI\ci\application\controllers\index.php on line 11
Call Stack
#TimeMemoryFunctionLocation
10.0006383880{main}()..\index.php:0
20.0020456984require_once( 'C:\wamp\www\CI\ci\system\core\CodeIgniter.php' )..\index.php:202
30.05282731128call_user_func_array()..\CodeIgniter.php:359
40.05282731176Index->index()..\CodeIgniter.php:359
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Index extends CI_Controller {
function __construct(){
parent::__construct();
$this->load->helper('url');
}
function index(){
$data['title']="";
$data['navlist'] = $this->MCats->getCategoriesNav();
$data['mainf'] = $this->MProducts->getMainFeature();
$skip = $data['mainf']['id'];
$data['sidef'] = $this->MProducts->getRandomProducts(3,$skip);
$data['main'] = 'home';
$this->load->vars($data);
$this->load->view('template');
页:
[1]