简体   繁体   中英

Loading Models From In Libraries In Codeigniter

In my systems libraries folder I have a custom user library file. I put it in there because I have multiple codeigniter installs.

I can not seem to call my admin directories user model using fcpath.

$this->CI->load->model(dirname(FCPATH) . '/admin/application/modules/backend/models/user/user_model.php');

Any suggestions.

Just been more looking around Google and able to load it now all working now I hope. Just going to test it.

$file = dirname(FCPATH) . '/admin/application/modules/backend/models/user/user_model.php';
$file = dirname(FCPATH) . '/install/application/modules/setup/models/install_model.php'; // Only For Install Once

if(file_exists($file)) {
return true;
} else {
echo "Can't find file located in: " . $file;
}

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