ob_get_contents 获取输出缓存内容

时间:2023-03-08 22:31:07
function _require($filename)
{
ob_start();
include $filename;
$content = ob_get_contents();
ob_end_clean(); return $content;
}
include 引入的内容也可以在输入缓存中获取
if (!function_exists('version_compare') || version_compare(phpversion(), '5.3.0', '<')) {
return preg_replace("/{([^\}\{\n]*)}/e", "\$this->select('\\1');", $source);
}
php 版本比较函数

相关文章