Do all php include files have to be in an include directory, or is that just an organizational convenience? Can I include files from any directory using the path to that directory? Do html files that contain php includes have to have a php extension? If so, I guess that would mean all of my html docs would be php if they all have the menus I am planning to "include". Is that acceptable protocol to have every file on your site be a php file?
A bow in humble reverence...
p.s. is there a good bible on this topic!?
You don't need to have your php includes anywhere particular, or have any file extension...
Calling include('/path/to/your/file/with/any/extension.extension'); should include it as a php file
Normally safer to call files with php code in with a php extension tho.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With