Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How-to change the colors from phpinfo() fit it to your page |
|
Author |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 24 Jul '06 14:33 Post subject: How-to change the colors from phpinfo() fit it to your page |
|
|
Code: |
<?php
ob_start();
phpinfo();
$Ausgabe = ob_get_contents();
ob_end_clean();
preg_match_all("=<body[^>]*>(.*)</body>=siU", $Ausgabe, $a);
$phpinfo = $a[1][0];
$phpinfo = str_replace( 'width="600"', 'width="750"', $phpinfo );
$phpinfo = str_replace( 'border="0" cellpadding', 'class="x" border="0" cellpadding', $phpinfo );
$phpinfo = str_replace( '<td>', '<td><div class="tt">', $phpinfo );
$phpinfo = str_replace( '<td class="e">', '<td class="e"><div class="te">', $phpinfo );
$phpinfo = str_replace( '<td class="v">', '<td class="v"><div class="tv">', $phpinfo );
$phpinfo = str_replace( '</td>', '</div></td>', $phpinfo );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<title>phpinfo()</title>
<style type="text/css">
<!--
body {
margin: 10px 10px 10px;
background-color: #fff;
color: #000000;
}
body,p,h1,h2,h3,h4,h5,h6,td,ul,ol,li,div,address,blockquote,nobr {
font-size: 11px;
font-family: Verdana, Tahoma, Arial Helvetica, Geneva, Sans-Serif;
font-weight: normal;
}
pre {
margin: 0px;
font-family: monospace;
}
a:link {
color: #000099;
text-decoration: none;
}
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 #a2aab8;
vertical-align: baseline;
}
h1 {
font-size: 16px;
font-weight: bold;
}
h2 {
font-size: 14px;
font-weight: bold;
}
.p {
text-align: left;
}
.e {
background-color: #e3e3ea;
font-weight: bold;
color: #000000;
}
.h {
background-color: #a2aab8;
font-weight: bold;
color: #000000;
font-size: 11px;
}
.v {
background-color: #efeff4;
color: #000000;
}
i {
color: #666666;
background-color: #cccccc;
}
img {
float: right;
border: solid 1px #1a1a1a;
background-color:#9999cc;
}
hr {
width: 750px;
background-color: #cccccc;
border: 0px;
height: 1px;
color: #1a1a1a;
}
.x {
width: 750px;
}
.tt {
}
.te {
font-weight:bold;
}
.tv {
position:relative;
overflow:auto;
}
//-->
</style>
</head>
<body>
<?php
echo $phpinfo;
?>
</body>
</html>
|
|
|
Back to top |
|
maniac
Joined: 29 Mar 2006 Posts: 31 Location: Ukraine
|
Posted: Mon 24 Jul '06 18:47 Post subject: |
|
|
I prefer hack into phpinfo c code (: |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Mon 24 Jul '06 19:23 Post subject: |
|
|
maniac wrote: | I prefer hack into phpinfo c code (: |
Actually this is cleaner... since you can change the layout without recompile and have a custome theme that matches your scripts on all server you deploy it on. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 24 Jul '06 19:33 Post subject: |
|
|
If you want it in C you may write an extension and load it into phpinfo
Code: |
php_info_print_table_start();
php_info_print_table_header(2, "First column", "Second column");
php_info_print_table_row(2, "Entry in first row", "Another entry");
php_info_print_table_row(2, "Just to fill", "another row here");
php_info_print_table_end();
|
see
http://de2.php.net/manual/de/zend.printing.php |
|
Back to top |
|
|
|
|
|
|