Last active
June 4, 2017 13:27
-
-
Save hxmwr/7404d166296b4a26da7026d3a18f71de to your computer and use it in GitHub Desktop.
php 脚本返回后继续运行
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
ignore_user_abort(true); | |
set_time_limit(0); | |
ob_start(); | |
// do initial processing here | |
echo $response; // send the response | |
header('Connection: close'); | |
header('Content-Length: '.ob_get_length()); | |
ob_end_flush(); | |
ob_flush(); | |
flush(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment