17得票4回答
Php中的ob_get_contents函数是如何工作的?

这是我正在阅读的书中的示例代码:ob_start(); include("{$path}.ini"); $string = ob_get_contents(); ob_end_clean(); $pairs = parse_ini_string($string); 我的问题是,ob_get_c...

8得票3回答
在循环中使用ob_start()函数

我在使用foreach()循环时遇到了问题,循环内部使用ob_start()和ob_get_clean()。 这是我的函数: protected function renderEmail() { $template = $this->_case.".php"; if(is_file(...