一个捕获函数输出的函数

  <?
/**
  * 捕获一个函数的输出
  * example:get_output(array($this,’test’));
*/
function get_output($array
)
{
   
ob_start
();
   
call_user_func($array
);
   return 
ob_get_clean
();
}
?> 
  

留言