Welcome Guest, Not a member yet? Register   Sign In
Define/include "globally available" arrays and functions
#14

(This post was last modified: 06-06-2021, 09:16 AM by tomsenner. Edit Reason: php markup )

(06-06-2021, 05:54 AM)paulbalandan Wrote: You can place the file anywhere you want as it is not specifically a helper. Helpers' file names should end in `_helper`, like `number_helper.php` for the `helper()` function to work. Since your file is not a helper per se, anywhere is fine as long as you include the full path to the `$files` property.

I created the file "app/own_functions.php" and added the line 

PHP Code:
public $files = [ 'app/own_functions.php', ]; 

in "app/Config/Autoload.php". But the view that is using the function only outputs the error "Call to undefined function".
I tried to change the path inside public $files in various ways (e.g without "app/" only 'own_functions.php'). Still only errors. What's my mistake?
Reply


Messages In This Thread
RE: Define/include "globally available" arrays and functions - by tomsenner - 06-06-2021, 09:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB