CodeIgniter Forums
Read/Load all php files with a certain ending? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Read/Load all php files with a certain ending? (/showthread.php?tid=10642)

Pages: 1 2 3


Read/Load all php files with a certain ending? - El Forum - 08-10-2008

[eluser]Nummero2[/eluser]
Ah thanks, you are the man!

finally I see an array.

Is it possible to search in my helper files for a certain function (in my case a test function) which is present in most of the helpers in the following syntax:

"function helper_name_helper_test"

So they are always ending with _helper_test

I would like to always search for the function and so make it include itself within my sidekick if new helpers are added to the folder.


Read/Load all php files with a certain ending? - El Forum - 08-10-2008

[eluser]xwero[/eluser]
That is an whole other case. In that situation it would be better to create a helper with the functions you need and load that helper in the class.

Otherwise you need to read all the files and check for the function names which is a very expensive procedure.