Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14318 reviews 1707 hosting providers

Questions & Answers

PHP output buffering problem

Jun 18, 2013 by rocky_10
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 votes
Jun 18, 2013 by SmartHost
Try this php code
    $variable = ob_get_contents();
    echo $variable;