Created
October 2, 2015 22:42
-
-
Save byteranger/fac2076f28bbd8c9c20f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/* | |
TESTED: | |
CentOS/WHM/CPanel | |
Apache 2.4 | |
PHP 5.5.29 | |
suPHP | |
CGI/FastCGI | |
AND | |
Debian | |
Lighttpd 1.4.31 | |
PHP 5.4.45 | |
FPM/FastCGI | |
*/ | |
if (!ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE)) echo 'could not open output buffer...'; | |
//TODO: include 'somecontent.php'; | |
echo 'some content that shouln\'t be seen because it gets extracted from the buffer into a variable...'; | |
//ORIGINALLY USING THIS, BUT HID THE FAILURE OF ob_end_clean BELOW: $html = ob_get_clean(); | |
$html = ob_get_contents(); | |
if (!ob_end_clean()) echo 'could not clean output buffer...'; | |
echo 'script finished...'; | |
//RESULT: some content that shouln't be seen because it gets extracted from the buffer into a variable...could not clean output buffer...script finished... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment