note 20150 added to function.phpinfo

From: Date: Sun, 24 Mar 2002 18:14:41 +0000
Subject: note 20150 added to function.phpinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-28147@lists.php.net to get a copy of this message
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 ); -- http://www.php.net/manual/en/function.phpinfo.php http://master.php.net/manage/user-notes.php?action=edit+20150 http://master.php.net/manage/user-notes.php?action=delete+20150 http://master.php.net/manage/user-notes.php?action=reject+20150

« previous php.notes (#28147) next »