Welcome Guest, Not a member yet? Register   Sign In
Find out where a helper file is being loaded
#1

I am having a project, that contains several Controllers, Views and Helpers (The original developer, from whom I overtook the job, didn't bother to use Models).
In one of the Controllers (Iframes.php), there is (of course) a function __construct(), an index() and a function called view().
In the construct, there is a $this->load->helper('iframes');
No other helpers are being loaded.

The website is being accessed by address https://website.ext/iframes/view/1234567890

In the iframes_helper.php, there is no reference to another helper file soever.
But the iframes_helper.php is calling a function called get_loans(). That function only exists in one file: loans_helper.php

There are OTHER Controllers that load the loans_helper.php (by its normal way).

If I rename the loans_helper.php (to loans_helper.php1), the system won't load, stating a file is missing. It doesn't tell me WHERE there is being referred to the missing file.

I've searched through all the files for 
Code:
load->helper('loans')
even for
Code:
load->helper('loans

and
Code:
('loans')

but there is nowhere a referral to the loans_helper file.
But the function get_loans is still accessible. How can this be? Or rather: how do I find out where the helper is being loaded?

Albert
Reply
#2

It may be in the application/config/autoload.php file.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#3

Hi Includebeer

Thank you for your reply! You are right, I found it in the autoload.php Big Grin

Albert
Reply




Theme © iAndrew 2016 - Forum software by © MyBB