Wed. August 19, 2:46:52 PM
Including functions in "footer" include files:
My understanding is that ASP takes the source code, scans it for includes, finds those files and basically copy-pastes their contents into the parent document (in memory, of course), and does this recursively until all included files are merged together. Then it takes this conglomerated file and parses it as though it were one big file. PHP behaves differently, it reads and parses the parent document, and if it comes across a call to the include() or require() functions it then executes those, thus allowing you to conditionally include a file by wrapping it in if statements. Each method has its benefits and limitations.