time ())) { array_push ( $temp, $user [0] . "," . $user [1] ); } } array_push ( $temp, getip () . "," . (time () + ($timeout)) . '#' ); $user_arr = implode ( "#", $temp ); $fp = fopen ( $user_online, "w" ); flock ( $fp, LOCK_EX ); fputs ( $fp, $user_arr ); flock ( $fp, LOCK_UN ); fclose ( $fp ); echo "当前有" . count ( $temp ) . "人在线"; ?>