I'm trying to write a script to run when closing the page or tab, but can't get it to work.
Can someone check my code.
Connection_Aborted
doesn't seems to work when closing the page.
I don't know whats wrong in my script.
I have search the net for possibility to fix my code. some people put it in while loop
which i don't want it to be in while loop
can this be done with out loop.
Here is my code.
Ignore_User_Abort(True);
if(Connection_Aborted()==1)
{
file_put_contents('/tmp/phptest1234.txt', 'test');
}