Overwrite CodeIgniter Common.php
There's no officially supported way to do this by the built in extending mechanisms. Consider some other way to achieve your goal.
However the functions inside Common.php
are all wrapped inside an if
checking if the function is already exists or not so you can do the following:
- Create your
MY_Common.php
put somewhere in your project (maybeapplication/core/
to mirror other similar extends) - Open your
index.php
file in the root of the project - insert
include APPPATH.'core/MY_Common.php';
before the closing
require_once BASEPATH.'core/CodeIgniter.php';
line
Now if you have you have a load_class
function in your MY_Common.php
it will shadow the original version.