note 121957 added to function.phpinfo
| From: | bimal at sanjaal dot com | Date: | Fri, 01 Dec 2017 02:06:28 +0000 |
| Subject: | note 121957 added to function.phpinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209284@lists.php.net to get a copy of this message | ||
If you are embeding the output of the function within a page, the <html> tag can collide and
page will distort.
Rather, it is important to extract the contents within the <body> and </body> tags only.
Here is how.
<?php
public function info()
{
ob_start();
phpinfo();
$info = ob_get_clean();
$info = preg_replace("/^.*?\<body\>/is", "", $info);
$info = preg_replace("/<\/body\>.*?$/is", "", $info);
echo $info;
}
?>
----
Server IP: 208.43.231.9
Probable Submitter: 104.205.115.227
----
Manual Page -- http://php.net/manual/en/function.phpinfo.php
Edit -- https://master.php.net/note/edit/121957
Del: integrated -- https://master.php.net/note/delete/121957/integrated
Del: useless -- https://master.php.net/note/delete/121957/useless
Del: bad code -- https://master.php.net/note/delete/121957/bad+code
Del: spam -- https://master.php.net/note/delete/121957/spam
Del: non-english -- https://master.php.net/note/delete/121957/non-english
Del: in docs -- https://master.php.net/note/delete/121957/in+docs
Del: other reasons-- https://master.php.net/note/delete/121957
Reject -- https://master.php.net/note/reject/121957
Search -- https://master.php.net/manage/user-notes.php