Heim > Artikel > Backend-Entwicklung > 聊天室php&mysql(二)_PHP教程
//第二页面 name="frame2.php"
include "../signup/mysql.php";
header("Expires: Sun, 28 Dec 1997 09:32:45 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/html; charset=${Charset}");
$current_time=time();
$delete_time=$current_time-40;
$sql="delete from chat_user where last_timemysql_query($sql)or die(" false again");
$sql="update chat_user set last_time='$current_time' where userid='$userid'";
mysql_query($sql) or die("false");
$sql="select userid from chat_user";
$result=mysql_query($sql)or die("fallse");
$online=mysql_num_rows($result);
?>