continue processing php after sending http response

后端 未结 12 1141
旧时难觅i
旧时难觅i 2020-11-22 13:06

My script is called by server. From server I\'ll receive ID_OF_MESSAGE and TEXT_OF_MESSAGE.

In my script I\'ll handle incoming text and ge

12条回答
  •  时光说笑
    2020-11-22 13:28

    I use the php function register_shutdown_function for this.

    void register_shutdown_function ( callable $callback [, mixed $parameter [, mixed $... ]] )
    

    http://php.net/manual/en/function.register-shutdown-function.php

    Edit: The above is not working. It seems I was misled by some old documentation. The behaviour of register_shutdown_function has changed since PHP 4.1 link link

提交回复
热议问题