关于权限,仅自己可见的有关问题

WBOY
Release: 2016-06-13 12:50:36
Original
788 people have browsed it

关于权限,仅自己可见的问题
我要实现登录以后,如一篇文章仅这个登录人可见,应该如何实现,用php来做,应该怎样做了?

php 仅自己可见
------解决方案--------------------
你怎么验证用户已登录的呢?
每篇文章的数据库里,应该有一个字段为uid。
if($uid==$current_user_id){
// 显示文章
}
前一个uid为文章数据库里作者的uid, 后一个为用户登录数据库里的id。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!