|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-15 17:31 UTC] derick@php.net
[2004-05-21 15:40 UTC] nlopess@php.net
[2020-02-07 06:12 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 18:00:01 2025 UTC |
Description: ------------ This might sound strange, but I want to display the content of phpinfo() in plain text in an administrative tool that only developers has access to, to embed its content without altering my design. The documentation reads that phpinfo() outputs plain text if html_errors is Off but even if I set html_errors to Off into php.ini, an .htaccess file or manually with ini_set(), this doesn't affect the output of phpinfo(). Reproduce code: --------------- <?php // backing up old value $html_errors = ini_get('html_errors'); ini_set('html_errors', 0); phpinfo(); // restoring preceding html_errors value ini_set('html_errors', $html_errors); ?> Expected result: ---------------- Plain text and no HTML. Actual result: -------------- HTML, HTML and only HTML. I checked into PHP 4.3.5 and it does the same too. I also checked using the PHP CLI and fortunately, the content outputted is in Plain Text (php -r phpinfo();) JP.