连接数据库
session&smarty
1.数据库创建py->py_user(username/password)¬es2(date,tit,des,content,author,)
2.reg.html->reg.php(连接数据库,判断是否存在,存在返回,不存在注册成功,到登陆页面,插入数据库)
3.login.html->login.php(和数据库中已保存的userName和password对比,正确到主页面,错误返回登陆页面重新登陆)
4. index.html(模板)<-index.php(smarty模板引擎输出) ;
5.index.php: 查询是否存在li中要显示的信息(id tit des date)并获取 暴露已设置的session
6.index.html:{if}{else}{/if}