PHP output buffering problem

asked Jun 17, 2013 in General by rocky_10 (260 points)
Hi there

I want to add the body of the phpinfo() function output inside another page. I want to do this using output buffering, but I don’t know how to. The header and footer of my page are showing, but the phpinfo() section is not displaying.
I am using PHP V 5.2 . can anyone please help
Many thanks

1 Answer

0 like 0 dislike
answered Jun 17, 2013 by SmartHost (9,060 points)
Try this php code
    $variable = ob_get_contents();
    echo $variable;