tp框架的基本使用(一)

本文档介绍了TP框架的基本使用,从项目前的准备工作开始,包括需求分析、数据库设计,到使用TP框架搭建项目结构。通过命令行生成目录,并推荐使用Sublime编辑器。讲解了如何访问项目,从后台管理入手,创建用户管理模块,涉及用户的浏览、删除、修改及多条件搜索、分页功能。同时提到了文件上传的操作步骤。
摘要由CSDN通过智能技术生成
 

项目论坛项目前准备工作 1.需求分析 参考discuz开源产品 discuz产品安装后 下一步...需要将数据库用户名密码输入正确 添加一个管理员账号 记住用来登录网站后台的 之后完成 问题: 访问首页没有样式 地址栏输入admin.php 进入后台 工具选项 更新缓存 报错 缺少参数 按报错找到文件指定行将参数加进去 true 再更新缓存 重新访问即可

BUG 用户管理 详情有问题

2.需求分析表 按需求分析表 给大家演示对应模块 需要大家明确需求

3.按需求表进行数据库设计 参考数据字典

4.开始项目 项目使用框架 先将结构搭建出来

5.TP中使用命令行生成目录 需要将php.exe加入到环境变量中

6.开发时编辑器 建议使用sublime 将整个项目放进去 方便查找 也可以使用快捷方式ctrl+p找到指定文件进行编辑

7.解压tp5.1压缩包 到根目录TP5.1的入口文件为:D:\xampp\htdocs\mydiscuz\public\index.php

进行虚拟主机配置(linux位置讲)

    apache配置文件中 D:\xampp\apache\conf 
    确认下面的是打开的
    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    按包含地址找到文件使用编辑器打开进行如下配置

    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.example.com
        DocumentRoot "D:\xampp\htdocs\mydiscuz\public"
        ServerName www.mydiscuz.com
        ErrorLog "logs/dummy-host2.example.com-error.log"
        CustomLog "logs/dummy-host2.example.com-access.log" common
    </VirtualHost>

    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.example.com
        DocumentRoot "D:\xampp\htdocs"
        ServerName localhost
        ErrorLog "logs/dummy-host2.example.com-error.log"
        CustomLog "logs/dummy-host2.example.com-access.log" common
    </VirtualHost>


将DNS域名解析中 先找本机hosts文件 所以在hosts中进行配置
C:\Windows\System32\drivers\etc\hosts

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值