i want to make a “loader class” that will require selected files.
so i just can call eg. loader::load(‘systemLibraries, ‘applicationLibraries’).
so inside this load() method i will use require. but i have tried this and it seems that the files required can’t be used outside the class.
how can i make it globally accessed?
This should work fine:
Given that MyClass is in “MyClass.php”
This on the other hand, won’t work
If
include.phplooks like thisYou can’t do this:
As there are scope issues.
You are going to need to give us more information on exactly what you are trying to access.