开发者

Execute PHP code after something is displayed in the browser

I want code in a php5 page be executed after all of the page (or maybe even after the first part of the page) is displayed.

I would prefer no javascript and no frames / iframes and no redirects. Just one page written in php, only emitting html.

I remember some special function in php5 to register a callback function that will be executed after the content is sent to the browser, but could not find, did I dream this?

What are the most common ways to do this? I am on Linux / Apache.

It 开发者_Python百科is not necessary to write a complete example, if you just name the ways or describe the trick and I lookup the details for myself

Edit: Now I am asking another question about the execution of the shutdown function here:

How to make sure the user cannot interrupt execution of php code called by "register_shutdown_function"?


Are you looking for register_shutdown_function()?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜