This is a tricky one to explain. So I'll bullet point it:
- I have a file that require_once all my settings files and classes ...I call it start.php
- I require_once that file in my index.php
- My index.php file then I require_once a another file called home.php
This scripts works perfectly on my localhost server. Now my issue presents itself when I try it on my online server and some functions seem to be working while others are not and I get this error:
Fatal error: Call to undefined function update_display() in /xxxxx/home.php on line 146
Now I know "Fatale error" is because I require_once, but what I don't understand is why some functions seem to be working while others do not?
Also worth mentioning that if I do require_once in my home.php file, it says that I am declaring the function twice!
Any help, much appreciated.
dirname(__FILE__) .to it (note: dot is for concatenation with the relative path that follows in the code)