My problem is I need to execute a function every time I include a file.
But I know that if I use include inside a function, it will mess up.
So there is a way to change include function to execute a function inside? Or to create a "listener" that gets triggered if I use include?
Example:
function include_file($path){
if($this->error)
echo $this->error_msg;
include_once($path);
}
Thanks!