GithubHelp home page GithubHelp logo

qa-wenda's Introduction

qa-wenda

基于 ThinkPHP 3.1.3 的问答系统 - QA 问答

系统功能

  1. 游客或注册用户可以浏览或发起提问、回答问题。
  2. 每天登录会获取相关的经验和金币,发起提问或帮助别人回答问题也可以获取一定的经验和金币。
  3. 经验的增加会伴随等级的上升,金币则可以用来发起悬赏,提高问题的回答率。
  4. 被采纳的回答会获取更高的经验和金币。
  5. 当用户的回答或提问涉及违法违规等,将会被管理员删除,并扣除一定的经验和金币。

会话相关

  • 前台使用Redis存储 Session,配合 Cookie 实现记住登录。
  • 后台使用数据库Db存储 Session。

安装说明

  1. 下载一份 ThinkPHP3.1.3 的完整包。把解压后的ThinkPHP/目录拷贝到项目根目录下。(官网下载地址

  2. 导入数据库。把数据库文件Data/SQL/qa-wenda.sql导入到本地 MySQL 数据库。(已定义数据库名为qa-wenda

  3. 配置数据库。打开Conf/config.php配置前 5 行。

  4. 添加hd_session表。表结构如下:

CREATE TABLE hd_session (
  session_id varchar(255) NOT NULL,
  session_expire int(11) NOT NULL,
  session_data blob,
  UNIQUE KEY `session_id` (`session_id`)
); 

其中,hd_是本地配置的表前缀。(表结构参考自官方数据库驱动Session相关文件注释:ThinkPHP/Extend/Driver/Session/SessionDb.class.php

  1. 添加Redis驱动。把Data/Driver/SessionRedis.class.php文件拷贝到ThinkPHP/Extend/Driver/Session/目录下。

  2. 配置Redis连接参数。在Index/Conf/config.php第 21 、22 行配置。

管理员账号

账号 密码 角色
admin admin 管理员

协议

MIT

qa-wenda's People

Contributors

mingcw avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.