An officially unsupported way to do this is with built-in extension mechanisms. Think of another way to achieve your goal.
However, functions inside Common.php wrapped inside if if the function already exists or not, so you can do the following:
- Create your
MY_Common.php placed somewhere in your project (perhaps application/core/ to reflect other similar extensions) - Open the
index.php file in the project root directory - insert
include APPPATH.'core/MY_Common.php'; before closing require_once BASEPATH.'core/CodeIgniter.php'; line
Now, if you have the load_class function in MY_Common.php , it obscures the original version.
source share