When a file is included the parser has to do a context switch from "PHP mode" to "HTML Mode" until it either reads a <? delimiter or hits EOF, it then has to switch back to "PHP mode"
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
When a file is included the parser has to do a context switch from "PHP mode" to "HTML Mode" until it either reads a <? delimiter or hits EOF, it then has to switch back to "PHP mode"
Nice explaination. Anyway, I've been using require_once() to include bits of php code that's reused on my sites. I take it tht the get_contents() doesn't parse PHP so it would essentially be useless for my application ?
The file_get_contents() function reads a file, and throws the content into a pre-specified string. As of this, yes, it is indeed useless for your case.
is not matter of velocity. file_get_contents() returns the content of the file. include() not take the content in a variable, simply include the content and, if there is php code, excecutes. file_get_contents() not excecute nothing.