note 64282 added to function.phpinfo

From: Date: Tue, 11 Apr 2006 15:39:41 +0000
Subject: note 64282 added to function.phpinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-107777@lists.php.net to get a copy of this message
If you want to have a customize phpinfo(), you could use this script: <?php //This will get the phpinfo() text into a variable, (Thanks Helpful Harry) ob_start(); phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); // You could define your own style in the $style variable $style = " body {background-color: #ffffff; color: #000000;} body, td, th, h1, h2 {font-family: sans-serif;} pre {margin: 0px; font-family: monospace;} a:link {color: #000099; text-decoration: none; background-color: #ffffff;} a:hover {text-decoration: underline;} table {border-collapse: collapse;} .center {text-align: center;} .center table { margin-left: auto; margin-right: auto; text-align: left;} .center th { text-align: center !important; } td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;} h1 {font-size: 150%;} h2 {font-size: 125%;} .p {text-align: left;} .e {background-color: #ccccff; font-weight: bold; color: #000000;} .h {background-color: #9999cc; font-weight: bold; color: #000000;} .v {background-color: #cccccc; color: #000000;} .vr {background-color: #cccccc; text-align: right; color: #000000;} img {float: right; border: 0px;} hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;} #3fbb50;} "; // This instruction will find out the style tags on the phpinfo() text, and replace them with the style defined before $phpinfo = preg_replace("@<style type=\"text/css\">[\s\S]*</style>@", "<style type=\"text/css\">$style</style>", $phpinfo); // Finally print the info to the browser echo $phpinfo; ?> Thanks to Helpful Harry for his note. ---- Server IP: 85.116.0.130 Probable Submitter: 200.93.42.197 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.phpinfo.php Edit -- http://master.php.net/note/edit/64282 Del: integrated -- http://master.php.net/note/delete/64282/integrated Del: useless -- http://master.php.net/note/delete/64282/useless Del: bad code -- http://master.php.net/note/delete/64282/bad+code Del: spam -- http://master.php.net/note/delete/64282/spam Del: non-english -- http://master.php.net/note/delete/64282/non-english Del: in docs -- http://master.php.net/note/delete/64282/in+docs Del: other reasons-- http://master.php.net/note/delete/64282 Reject -- http://master.php.net/note/reject/64282 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107777) next »