非swoole的方式实现简单的异步(nginx模式下)
set_time_limit(0);echo '任务开始'.time();/*即时打印*/register_shutdown_function([$this, "test"]);/*异步执行 test 为类中方法名 */echo '任务结束'.time();/*即时打印*/fastcgi_finis
If the copyright belongs to the longfei, please indicate the source!!!