Because with readfile you don't have control over flow- if the file exists, it will be passed to client, if not, error will be generated- file_get_contents allows you to silently evaluate "including" (cause its return is content of the file, or FALSE), and manipulating the content received in manners of variable operations (joining, cutting, replacing, grepping, etc...).Quote:
Originally Posted by mwinter
Secondly you can focus on damage control if it's not included for some reason- think of it like "template" loading, where you can still "default" to something.
Well, you can trigger a php code accidently, I'd call it nasty :)Quote:
That's not exactly nasty, is it, but expected.
