Helpers - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Helpers (/showthread.php?tid=67893) |
Helpers - donpwinston - 04-20-2017 I noticed that making my own helper functions does not work? form validation and sessions appear to work! RE: Helpers - kilishan - 04-20-2017 More specifics are always helpful if you want the problem to get fixed. Are you seeing errors, the file not loading, etc? RE: Helpers - donpwinston - 04-20-2017 (04-20-2017, 11:05 AM)kilishan Wrote: More specifics are always helpful if you want the problem to get fixed. 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()' RE: Helpers - kilishan - 04-20-2017 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. RE: Helpers - donpwinston - 04-20-2017 (04-20-2017, 12:36 PM)donpwinston Wrote:(04-20-2017, 11:05 AM)kilishan Wrote: More specifics are always helpful if you want the problem to get fixed. The helper file needs to be named 'bnc_helper'.php Thanks. |