How can I execute PHP code on page close?

前端 未结 6 1912
心在旅途
心在旅途 2021-01-06 04:01

I am trying to find a method to execute some PHP code once a user closes the page. In my application, once the user closes or navigates away from the page the server will st

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-06 04:20

    Use the Body attribute onunload

    http://www.htmlcodetutorial.com/document/_BODY_onUnload.html

提交回复
热议问题