note 20150 deleted from function.phpinfo by nlopess
| From: | nlopess@php.net | Date: | Thu, 26 Feb 2004 14:32:17 +0000 |
| Subject: | note 20150 deleted from function.phpinfo by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-65798@lists.php.net to get a copy of this message | ||
Note Submitter:
----
if, for some reason, you want to display the phpinfo() contents in a page that already has the html,
head, body, etc. tags, you can use the output control functions to do this.
// start the output buffer, this means nothing will be displayed until the buffer is closed
ob_start();
// call the phpinfo function to display the php info
phpinfo();
// get contents of output buffer, which is everything that would have been printed from phpinfo();
$val_phpinfo .= ob_get_contents();
// flush the output buffer and delete the contents
ob_end_clean();
// get a substring of the php info to get rid of the html, head, title, etc.
$val_phpinfo = substr( $val_phpinfo, 554, -19 );
// change the width of the table to 450
$val_phpinfo = str_replace( 'width="600"', 'width="450"',
$val_phpinfo );