I am making a helper in codeigniter and i did it . But my helper have some other files too. I want to create a folder . But do not know how to call it in my controller.
Asked
Active
Viewed 204 times
0
-
This is a duplicate of: http://stackoverflow.com/questions/804399/codeigniter-create-new-helper – MrD Aug 21 '15 at 09:40
-
@Mr.M imho, not really, close enough but the OP is not asking for a looping structure – DarkMukke Aug 21 '15 at 09:43
-
Add your current code so we can get idea, What you mean by have other file ? is that mean file located in different folder ? – Hardik Raval Aug 21 '15 at 11:06
1 Answers
1
What you are looking for is directory_map https://ellislab.com/codeigniter/user-guide/helpers/directory_helper.html
but i would add the folder to the existing helper folder sub directories are automaticly mapped, you can then add all files in your autoloader
$autoload['helper'] = [
'form', 'html', 'url', 'array',
'function_helper', 'subdir/file1' , 'subdir/file2' , 'subdir/file3'
];
something like this should do, ofcourse, you can also create a loop to do this

DarkMukke
- 2,469
- 1
- 23
- 31