• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Helpers

#1
I noticed that making my own helper functions does not work?  Angry

form validation and sessions appear to work!  Smile
Simpler is always better
Reply

#2
More specifics are always helpful if you want the problem to get fixed. Smile

Are you seeing errors, the file not loading, etc?
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#3
(04-20-2017, 12:05 PM)kilishan Wrote: More specifics are always helpful if you want the problem to get fixed. Smile

Are you seeing errors, the file not loading, etc?

helper('bnc'); //bnc.php is in Helper folder and contains the function states()
print "<pre>" . print_r(states(), TRUE) . "</pre>";

When I call the function I get 'Call to undefined function App\Controllers\states()'
Simpler is always better
Reply

#4
Sounds like a possible bug. Could you post an issue over at GitHub so that I don't forget about it?

Also - have you done any checking of what's happening in the code yourself? If not, no biggy, but you're using Alpha-quality software at the moment, so that's probably a good practice to get into. Smile
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#5
(04-20-2017, 01:36 PM)donpwinston Wrote:
(04-20-2017, 12:05 PM)kilishan Wrote: More specifics are always helpful if you want the problem to get fixed. Smile

Are you seeing errors, the file not loading, etc?

helper('bnc'); //bnc.php is in Helper folder and contains the function states()
print "<pre>" . print_r(states(), TRUE) . "</pre>";

When I call the function I get 'Call to undefined function App\Controllers\states()'



The helper file needs to be named 'bnc_helper'.php

Thanks. Blush
Simpler is always better
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.