Welcome Guest, Not a member yet? Register   Sign In
My_Helper
#1

[eluser]laegnur[/eluser]
Hi

I made a file called MY_String_helper to extend the CI String_helper with the next function:
Code:
function strip_class($str)
{
  $str = strtolower($str);
  $str = str_replace(array("ñ", "ñ","ñ"),"nh",$str);
  return $str
}

Then I load the My_Helper from the control ($this->load->helper('string')Wink but when I used the function in a view with data from a model, it said that the function don't exists

Code:
Fatal error: Call to undefined function strip_class()
#2

[eluser]pistolPete[/eluser]
Maybe your server's file system is case sensitive, try MY_string_helper.php.
Did you save the file in application/helpers/?
#3

[eluser]laegnur[/eluser]
Ok, erm... It is solved... How embarrasing... it's a newbie's mistake... well, I'm a newbie after all...

Thanks for your help pistolPete




Theme © iAndrew 2016 - Forum software by © MyBB