如何开发一个多用户blog系统
最近因工作需要,公司需要自己开发一个内网的多用户blog系统,但以前一直做的都是单用户的blog,比如注册一个用户mdj 就能通过http://www.example.com/mdj http://www.example.com/username 访问.请教各位该如何实现...:'( H E L P 重写url.. 楼主你这样的公司待遇如何呢 不行呀 要不你把楼主接受过去算啦 如果要用CI开发,你可以考虑用动态的routing,也就是用户手册上提到的URI routering,只是这个router规则可能需要结合数据库实现。$route['blog/joe'] = "blogs/users/34";
$route['blog/saturn'] = "blogs/users/35";
......
剩下的就是你程序架构和功能上的事情了。 默认首页文件是 UserIndex.php
class UserIndex extends Controller
{
function _remap($method)
{
if (method_exists($this, $method))
{$this->$method();}
else
{$this->index($method);}
}
function index($User='') //必须带默认值
{
echo $User.'空的就是博文章首页啦。';
echo '不为空就是某个用户的blog文章啦。';
}
页:
[1]