Welcome Guest, Not a member yet? Register   Sign In
Automatically Load Helpers
#1

[eluser]Unknown[/eluser]
Hi everyone,

I've been working with Codeigniter, and I was just wondering how I can include helpers automatically instead of adding them to each controller. Is it okay to add it the the autoload.php in the config?

Best,
Dojo
#2

[eluser]sajid19991[/eluser]
[quote author="Dojo" date="1356985724"]Hi everyone,

I've been working with Codeigniter, and I was just wondering how I can include helpers automatically instead of adding them to each controller. Is it okay to add it the the autoload.php in the config?

Best,
Dojo[/quote]

Yes, thats very good and flexible thing to do....just make sure the helper file isnt too big or doesnt include many functions, im using a helper worth 6kb and doesnt gives problems at all, but when my helper was 14 kb the execution time was poor...so better to keep it under 10Kb and pure coding, good coding will always make sure of good performance....dont include heavy functions in helper....

Most of the time autoloding the helper wont give any problems....





Theme © iAndrew 2016 - Forum software by © MyBB