chi*_*ley 10
参见实施例#5和#6上的手动.从那里直接采取:
$string = get_include_contents('somefile.php');
function get_include_contents($filename) {
if (is_file($filename)) {
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
return $contents;
}
return false;
}
Run Code Online (Sandbox Code Playgroud)