PHP-Fehler #8192: Function utf8_encode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/prime.php;
Zeile: 65
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 294
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 338
PHP-Fehler #8192: Function utf8_decode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 296
PHP-Fehler #8192: Function utf8_encode() is deprecated;
Datei: /home/floernco/public_html/webscriptingData/inc/functions.php;
Zeile: 297
Eigenes phpinfo() .· PHP .· Webscripting .· floern.com

Eigenes phpinfo()

September 2009

Mit einem simplen Trick kann man sich sein eigenes phpinfo() kreieren.
Dazu fängt man die Ausgabe von phpinfo() per Ausgabepufferung ab und bearbeitet es entsprechend.

<?php
ob_start
();
phpinfo();
$phpinfo ob_get_clean();

# Body-Content rausholen
$phpinfo preg_replace('#^.*<body>(.*)</body>.*$#s''$1'$phpinfo);

# XHTML-Fehler korrigieren
$phpinfo str_replace('module_Zend Optimizer''module_Zend_Optimizer'$phpinfo);
# <font> durch <span> ersetzen
$phpinfo str_replace('<font''<span'$phpinfo);
$phpinfo str_replace('</font>''</span>'$phpinfo);

# Schlüsselwörter grün oder rot einfärben
$phpinfo preg_replace('#>(on|enabled|active)#i''><span style="color:#090">$1</span>'$phpinfo);
$phpinfo preg_replace('#>(off|disabled)#i''><span style="color:#f00">$1</span>'$phpinfo);

# usw...

echo '<div id="phpinfo">';
echo 
$phpinfo;
echo 
'</div>';
?>
Nachdem die Ausgabe von phpinfo() in die Variable $phpinfo gespeichert wurde, wird der Inhalt des <body>-Tags extrahiert, damit die Header und die CSS-Angaben aus dem Weg sind.
Anschliessend kann man den Inhalt beliebig verändern.

Formatieren lässt sich die Ausgabe mit folgenden CSS-Anweisungen:
<style type="text/css">
#phpinfo { }
#phpinfo a { }
#phpinfo h1 { }
#phpinfo h2 { }
#phpinfo table { }
#phpinfo td { }
#phpinfo th { }
#phpinfo .p { }
#phpinfo .h { }
#phpinfo .e { }
#phpinfo .v { }
#phpinfo .vr { }
#phpinfo img { }
#phpinfo pre { }
#phpinfo hr { }
</style>

Siehe auch:

Idee von http://www.php.net/phpinfo#87287.
 
PHP


Andere Einträge


Kommentare

#1
von KOA am 30.01.2011
Sehr brillant