have a file caching system for a php 5 library i use often.
when the request is made i check for a cached file, if there is one i render it and exit.
$contents = file_get_contents( self::_cacheFile() );
echo $contents;
exit();
i have to do file_get_contents instead of just include because of cached xml files with the pesky
`<?xml version="1.0"?>`
is there a better way to pull in my cache files without shorttags firing?
If all you want to do is output the file contents, you should be using readfile(). This is faster and less memory intensive than file_get_contents()