作者mesak (米沙)
看板Ajax
标题Re: [问题] 纪录离开网页的时间
时间Thu Mar 17 22:18:35 2011
HTML
$(window).unload(function(){
$.get('save.php');
})
save.php
<?
ignore_user_abort(true);
$filenum=@fopen('time.txt',"w");
flock($filenum,LOCK_EX);
$file_data=fwrite($filenum,time());
fclose($filenum);
?>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 112.104.6.246
1F:→ mesak:记得LOAD JQUERY ...... 03/17 22:19
2F:推 No:你是好人~ 03/18 02:13
3F:推 andy910389:谢谢! 03/18 10:59