一、用户注册登录

 

二、发表动态

	

include './header.php';

include './function.php';

$status = p('status'); if (empty($status)) { redirect("./home.php", "请输入内容", 3); } /* post表(发动态表) post:id:1:uid post:id:1:content */ $redis = connRedis(); $id = $redis->incr("global:post"); $redis->hMset("post:id:$id", array("uid" => $_COOKIE['id'], "content" => $status, "time" => date("Y-m-d H:i:s", time()), "username" => $_COOKIE['username'])); //最近50条发布的信息 $redis->lpush("newpost", $id); $redis->ltrim("newpost", 0, 49); //获取我的粉丝,并把我的动态发给他 $fans = $redis->smembers("flowing:userid:{$_COOKIE['id']}"); $fans[] = $_COOKIE['id']; foreach ($fans as $fansid) { $redis->lpush("receivepost:$fansid", $id); }


三、关注页


四、热点页