CodeIgniter Forums
custom helper file isn't loading codeigniter - 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: custom helper file isn't loading codeigniter (/showthread.php?tid=59051)



custom helper file isn't loading codeigniter - El Forum - 08-18-2013

[eluser]Xeroxeen[/eluser]
Hi,

I created a custom helper in codeigniter.And placed it in the system/helpers folder.My file name was "customhelper_helper.php".Then i loaded it in my controller this way."$this->load->helper('customhelper');".After that i called the function inside the helper file.But it's not working.Why is that?Plz help guys...



custom helper file isn't loading codeigniter - El Forum - 08-18-2013

[eluser]sv3tli0[/eluser]
All custom things must be set inside your App folder not at Sys!

And other thing is the _helper in the name. Remove it and leave it as customhelper.php.

Check CI Docs - http://ellislab.com/codeigniter/user-guide/general/helpers.html


custom helper file isn't loading codeigniter - El Forum - 08-19-2013

[eluser]Xeroxeen[/eluser]
ok.thanks.i'll check that way.


custom helper file isn't loading codeigniter - El Forum - 08-22-2013

[eluser]Xeroxeen[/eluser]
But it's still not loading.Why is that?


custom helper file isn't loading codeigniter - El Forum - 08-23-2013

[eluser]InsiteFX[/eluser]
Code:
// should be named like this application/helpers/custom_helper.php
custom_helper.php

$this->load->helper('custom');



custom helper file isn't loading codeigniter - El Forum - 08-23-2013

[eluser]Xeroxeen[/eluser]
[quote author="InsiteFX" date="1377278784"]
Code:
// should be named like this application/helpers/custom_helper.php
custom_helper.php

$this->load->helper('custom');
[/quote]

I'll check this one.Thanks for your valuable comment.I saw you have replied on my other thread regarding database issue.thanks for that too.because i'm spending many days on these issues to solve.i posted here also.but as i felt this forum isn't much active.gets more time to help.because we are finally come here to solve a codeigniter issue.because we are believing experts are here.So again thanks for you.Until you reply anyone didn't put valuable comment.thanks sir


custom helper file isn't loading codeigniter - El Forum - 08-24-2013

[eluser]Xeroxeen[/eluser]
Finally i could solve it.I removed,

if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('myfunctionname'))

Then it works fine