Welcome Guest, Not a member yet? Register   Sign In
custom helper file isn't loading codeigniter
#1

[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...
#2

[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-gui...lpers.html
#3

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

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

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

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

[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
#7

[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




Theme © iAndrew 2016 - Forum software by © MyBB