note 84000 added to function.phpinfo
| From: | yurkins at osu1 dot php dot net | Date: | Mon, 23 Jun 2008 14:24:26 +0000 |
| Subject: | note 84000 added to function.phpinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140737@lists.php.net to get a copy of this message | ||
big thanx 2 Mardy dot Hutchinson at gmail dot com
very good!
some fixes to correct result displaying:
1. we need to trim $matches [1], 'cause there can be empty lines;
2. not bad to remove <body> tag 'cause styles for it not apply correctly...
3. ...and change styles a little (remove "body" selector)
we need to change two lines:
<?php
preg_match ('%<style
type="text/css">(.*?)</style>.*?(<body>.*</body>)%s',
ob_get_clean(), $matches);
?>
to
<?php
preg_match ('%<style
type="text/css">(.*?)</style>.*?<body>(.*?)</body>%s',
ob_get_clean(), $matches);
?>
and
<?php
preg_split( '/\n/', $matches[1] )
?>
to
<?php
preg_split( '/\n/', trim(preg_replace( "/\nbody/", "\n", $matches[1]))
)
?>
That's all! Now we have a really flexible addition to phpinfo();
----
Server IP: 91.196.196.241
Probable Submitter: 92.113.218.90
----
Manual Page -- http://www.php.net/manual/en/function.phpinfo.php
Edit -- https://master.php.net/note/edit/84000
Del: integrated -- https://master.php.net/note/delete/84000/integrated
Del: useless -- https://master.php.net/note/delete/84000/useless
Del: bad code -- https://master.php.net/note/delete/84000/bad+code
Del: spam -- https://master.php.net/note/delete/84000/spam
Del: non-english -- https://master.php.net/note/delete/84000/non-english
Del: in docs -- https://master.php.net/note/delete/84000/in+docs
Del: other reasons-- https://master.php.net/note/delete/84000
Reject -- https://master.php.net/note/reject/84000
Search -- https://master.php.net/manage/user-notes.php