The standard practice in CI is to create a base model inside application/core called MY_Model.php , MY_ depends on what is defined in your configuration.
Then inside your MY_Model.php you can have many classes defined in this file that you can extend in your model, basically the CodeIgniter download model looks for specific classes in this path and file.
But if you want to use require_once , you have to use APPPATH (application path) as defined in index.php . But your custom model will still have to extend CI_Model , since it uses the main class for the CI model, or your model will not work.
ex require_once APPPATH.'/models/test.php';
ADDED NOTES:
Thank you @dean Or for pointing this out. Inside the MY_Model.php file there should be a MY_Model class that extends CI_Model .
source share