I have a seperate PHP file I include that has a several important functions on it. I also have a file called variables.php which I include into each function so I can call some important variables too. Is there a way to just call variables.php at the top of the page, instead of inside each function manually? I just thought it would be easier if there was a way to do like a ‘global’ include or something.
Share
Well, if they are constant variables (AKA they don’t change) you can define a constant instead
Or as of PHP5.3
Then you can access them in every function