For example, if "Functions" folder contains "Function_1.php", "Function_2.php" and "Function_3.php" files, how to make all php scripts access the 3 functions by default?
Asked
Active
Viewed 54 times
2
-
yes it is possible, you could probably create an autoload php file that handles all inclusion of said files and use that with the pages that needs it. – Kevin Nov 26 '20 at 02:50
-
@Kevin, thanks for your suggestion, but that's not a "Default Access" since "autoload.php" needs to be included in every single script! – User Nov 26 '20 at 02:55
-
1you could try loading it via htaccess, if it's a class you could also use `spl_autoload_register`. alternatively, you could use composer too to autoload your files – Kevin Nov 26 '20 at 03:07
-
https://stackoverflow.com/a/24780209 – IVO GELOV Nov 26 '20 at 07:11