duandai3964 2010-12-06 18:26
浏览 39

关于PHP possibilites的问题(用户,admin / mod)

First of all, I'm kinda new to web programming and programming in general. HTML/CSS + Javascript are as far as I've gone over the last few years.

Now, for the purpose of my work, I need to learn PHP.

What I'm most interested about is user registration + users' privileges.

My task is to create a web application that is, let's say, a simpler version of a blog. I'd like to know is it possible to build such an application from scratch and add users with different privileges. And, if so, what is the best way to do it? I doubt I'm gonna be using some framework as I intend to learn PHP coding on my own. If you could point me to some useful resources I would be more than grateful :)

Cheers

EDIT: I'll try to be more specific. My goal is not to create a content management system from scratch. I'm interested to know if there is a way to build a blog-like application with user registration and different privileges that are going to be applied on every page.

  • 写回答

2条回答 默认 最新

  • dongshao4207 2015-01-04 16:39
    关注

    In order to solve that problem you need some idea about how you are going to construct your website. Most of the times header and footer should be in different files which are later included on every page. In header there should be some user validation code. Which depending on user privileges will create some global variable which will later serve as a flag.

    For example: let's say you have privileges from 5 to 1. Five being full access and 1 being most restricted access. So later in the code you should create test for the privileges status which will change the output of the page depending on the number.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度