In my PHP app, I have several calls to require_once
. On my development PC this works fine and doesn't try to include the same file multiple times. However when I moved it to my production server I'm getting an error
cannot redeclare class myClass
After searching through the code I've found that this happens just after a call to require_once
, so it must be that which is causing it.
I've searched through the entire project and this class is definitely only declared in one file, and it's only ever included through require_once
. Is there some weird PHP config that would make require_once
behave differently on the production server?
Thanks