简体   繁体   中英

Call to undefined method MY_Loader::_ci_load_library()

I'm new to Codeigniter, and currently I just installed Codeigniter 2.2.0 with HMVC and ORM Datamapper version 1.8.2 .

I'm sure I have installed the ORM correctly, but when I test the Link, It give me this

Fatal error: Call to undefined method DM_Loader::_ci_load_library() in ...\application\third_party\MX\Loader.php on line 173

and, this is what inside loader.php

if ($path === FALSE)
        {
            $this->_ci_load_library($library, $params, $object_name);
        }

I'm sure had rename some protected in third_party/MX/Router.php and had added the code in index.php some codes below

/*
 * --------------------------------------------------------------------
 * LOAD THE BOOTSTRAP FILE
 * --------------------------------------------------------------------
 *
 * And away we go...
 *
 */
require_once APPPATH.'third_party/datamapper/bootstrap.php';
require_once BASEPATH.'core/CodeIgniter.php';

your answer is my enlightment. thank you.

Need change some field of Session Variables in config.php (application/config/config.php)

$config['sess_driver']         = 'files';
$config['sess_cookie_name']    = 'ci_session';
$config['sess_expiration']     = 7200;
$config['sess_save_path']      = 'ci_sessions';;
$config['sess_match_ip']       = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Opened the file and went to line 173 and changed

$this->_ci_load_library($library, $params, $object_name);

to

$this->_ci_load_class($library, $params, $object_name);

to match the only loading class I could see in the parent class CI_Loader that would make sense.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM