Created
May 12, 2020 01:14
-
-
Save AdamZWinter/865745e7e9a8f70536f97c316a616be2 to your computer and use it in GitHub Desktop.
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
// buffer all upcoming output | |
ob_start(); | |
echo 'All done. Goodbye.'; | |
// get the size of the output | |
$size = ob_get_length(); | |
// send headers to tell the browser to close the connection | |
header("Content-Length: $size"); | |
header('Connection: close'); | |
// flush all output | |
ob_end_flush(); | |
ob_flush(); | |
flush(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment