Include executes all of the code inside the file right away, and performs exactly as if you were copy-and-pasting the files into the document. This is different from how C or other languages handle #include
statements. Pretend you are copy and pasting your code from those 3 files into one file, in that order… would it work? If not, then the reason that isn’t working is the same as the reason this isn’t working. (Logical sanity check for include()
)
1
solved Confused as to why my PHP include isn’t working [closed]