Created
March 1, 2018 09:52
-
-
Save antonshell/9d07e666b8f3e427c84c024e4417da2e to your computer and use it in GitHub Desktop.
Hide system section from phpinfo()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
phpinfo(); | |
$phpinfo = ob_get_clean(); | |
$startPos = strpos($phpinfo,'<tr><td class="e">System </td>'); | |
$endPos = strpos($phpinfo,'</tr>',$startPos); | |
$output = substr($phpinfo, 0,$startPos); | |
$output .= substr($phpinfo,$endPos,strlen($phpinfo)); | |
echo $output; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment