当前位置:首页>python>Python 零基础100天—Day25 学生管理系统 — 第一阶段毕业项目

Python 零基础100天—Day25 学生管理系统 — 第一阶段毕业项目

  • 2026-07-02 00:21:22
Python 零基础100天—Day25 学生管理系统 — 第一阶段毕业项目

🐍 学生管理系统 — 第一阶段毕业项目

🕐 预计用时:4-5 小时 | 🎯 目标:用 OOP 架构完成完整的学生管理系统


📖 今日目录

  1. 项目架构设计
  2. Student 学生类
  3. Course 课程类
  4. GradeManager 成绩管理器
  5. FileManager 文件管理
  6. MenuUI 菜单界面
  7. 完整主程序
  8. 运行效果演示
  9. 第一阶段总结

1. 项目架构设计

student_system/
├── main.py              ← 主程序入口
├── models.py            ← 数据模型(Student, Course)
├── manager.py           ← 业务逻辑(GradeManager)
├── storage.py           ← 文件存储(FileManager)
├── ui.py                ← 菜单界面(MenuUI)
└── students.json        ← 数据文件(自动生成)

📋 功能清单

功能
说明
OOP 知识点
添加学生
输入姓名、学号、年龄
__init__、实例属性
添加课程成绩
为学生添加各科成绩
组合、字典
查看学生信息
显示详情+成绩单
__str__、property
修改学生信息
修改姓名、年龄等
setter、封装
删除学生
按学号删除
异常处理
查询学生
按姓名/学号搜索
列表推导式、filter
成绩排名
按总分/平均分排序
sorted、__lt__
统计分析
各科平均分、及格率
map、reduce、生成器
数据持久化
保存到 JSON 文件
文件操作、json
导入导出
CSV 格式导入导出
csv 模块

🏗️ 类关系图

┌─────────────┐     ┌──────────────┐
│   Student   │────▶│   Course     │  (1对多)
│  - sid      │     │  - name      │
│  - name     │     │  - score     │
│  - age      │     └──────────────┘
│  - courses  │
└─────────────┘
       ▲
       │ 管理
┌──────────────┐     ┌──────────────┐
│ GradeManager │────▶│  FileManager │  (依赖)
│  - students  │     │  - save()    │
│  - add()     │     │  - load()    │
│  - delete()  │     └──────────────┘
│  - search()  │
│  - ranking() │
└──────────────┘
       ▲
       │ 调用
┌──────────────┐
│    MenuUI    │
│  - run()     │
└──────────────┘

2. Student 学生类 (models.py)

from functools import total_ordering
from datetime import datetime

@total_ordering
class Student:
    """学生类"""
    _id_counter = 0

    def __init__(self, name, sid, age, courses=None):
        Student._id_counter += 1
        self.name = name
        self.sid = sid           # 学号
        self.age = age
        self.courses = courses or []  # Course 对象列表
        self.created_at = datetime.now().strftime("%Y-%m-%d %H:%M")

    @property
    def total_score(self):
        """总分"""
        return sum(c.score for c in self.courses)

    @property
    def avg_score(self):
        """平均分"""
        return self.total_score / len(self.courses) if self.courses else 0

    @property
    def course_count(self):
        """课程数"""
        return len(self.courses)

    @property
    def passed_all(self):
        """是否全部及格"""
        return all(c.score >= 60 for c in self.courses) if self.courses else False

    @property
    def failed_courses(self):
        """不及格课程"""
        return [c for c in self.courses if c.score < 60]

    def add_course(self, course):
        """添加课程(如果已存在则更新)"""
        for i, c in enumerate(self.courses):
            if c.name == course.name:
                self.courses[i] = course
                return
        self.courses.append(course)

    def remove_course(self, course_name):
        """删除课程"""
        self.courses = [c for c in self.courses if c.name != course_name]

    def get_course(self, course_name):
        """获取课程"""
        for c in self.courses:
            if c.name == course_name:
                return c
        return None

    def __eq__(self, other):
        if not isinstance(other, Student):
            return NotImplemented
        return self.sid == other.sid

    def __lt__(self, other):
        if not isinstance(other, Student):
            return NotImplemented
        return self.total_score < other.total_score

    def __str__(self):
        status = "✅ 全部及格" if self.passed_all else f"❌ {len(self.failed_courses)}科不及格"
        return (f"[{self.sid}] {self.name}, {self.age}岁, "
                f"{self.course_count}科, 均分{self.avg_score:.1f}, {status}")

    def to_dict(self):
        """转为字典(用于 JSON 序列化)"""
        return {
            "name": self.name,
            "sid": self.sid,
            "age": self.age,
            "courses": [c.to_dict() for c in self.courses],
            "created_at": self.created_at,
        }

    @classmethod
    def from_dict(cls, data):
        """从字典创建(用于 JSON 反序列化)"""
        from models import Course
        courses = [Course.from_dict(c) for c in data.get("courses", [])]
        s = cls(data["name"], data["sid"], data["age"], courses)
        s.created_at = data.get("created_at", "")
        return s


class Course:
    """课程类"""
    def __init__(self, name, score, credit=1.0):
        self.name = name
        self.score = score
        self.credit = credit

    @property
    def grade(self):
        """等级"""
        if self.score >= 90: return "A"
        if self.score >= 80: return "B"
        if self.score >= 70: return "C"
        if self.score >= 60: return "D"
        return "F"

    @property
    def passed(self):
        return self.score >= 60

    def __str__(self):
        status = "✅" if self.passed else "❌"
        return f"{self.name}: {self.score}分 ({self.grade}) {status}"

    def __eq__(self, other):
        return isinstance(other, Course) and self.name == other.name

    def to_dict(self):
        return {"name": self.name, "score": self.score, "credit": self.credit}

    @classmethod
    def from_dict(cls, data):
        return cls(data["name"], data["score"], data.get("credit", 1.0))

3. GradeManager 成绩管理器 (manager.py)

from models import Student, Course

class GradeManager:
    """成绩管理器:核心业务逻辑"""

    def __init__(self):
        self.students = {}  # {sid: Student}

    # ============ 增删改查 ============
    def add_student(self, name, sid, age):
        """添加学生"""
        if sid in self.students:
            raise ValueError(f"学号 {sid} 已存在")
        student = Student(name, sid, age)
        self.students[sid] = student
        return student

    def remove_student(self, sid):
        """删除学生"""
        if sid not in self.students:
            raise KeyError(f"学号 {sid} 不存在")
        return self.students.pop(sid)

    def get_student(self, sid):
        """获取学生"""
        if sid not in self.students:
            raise KeyError(f"学号 {sid} 不存在")
        return self.students[sid]

    def update_student(self, sid, **kwargs):
        """更新学生信息"""
        student = self.get_student(sid)
        for key, value in kwargs.items():
            if hasattr(student, key) and key != "sid":
                setattr(student, key, value)
        return student

    def add_grade(self, sid, course_name, score, credit=1.0):
        """添加/更新成绩"""
        student = self.get_student(sid)
        course = Course(course_name, score, credit)
        student.add_course(course)
        return course

    def remove_grade(self, sid, course_name):
        """删除成绩"""
        student = self.get_student(sid)
        student.remove_course(course_name)

    # ============ 查询 ============
    def search_by_name(self, keyword):
        """按姓名搜索"""
        keyword = keyword.lower()
        return [s for s in self.students.values() if keyword in s.name.lower()]

    def search_by_sid(self, keyword):
        """按学号搜索"""
        return [s for s in self.students.values() if keyword in s.sid]

    def search(self, keyword):
        """综合搜索"""
        return self.search_by_name(keyword) + [
            s for s in self.search_by_sid(keyword) if s not in self.search_by_name(keyword)
        ]

    def get_all_students(self):
        """获取所有学生"""
        return list(self.students.values())

    # ============ 排名 ============
    def ranking(self, reverse=True):
        """按总分排名"""
        return sorted(self.students.values(), reverse=reverse)

    def course_ranking(self, course_name):
        """某科排名"""
        students_with_course = [
            s for s in self.students.values() if s.get_course(course_name)
        ]
        return sorted(students_with_course,
                      key=lambda s: s.get_course(course_name).score, reverse=True)

    # ============ 统计 ============
    def course_stats(self, course_name):
        """某科统计"""
        scores = []
        for s in self.students.values():
            c = s.get_course(course_name)
            if c:
                scores.append(c.score)
        if not scores:
            return None
        return {
            "count": len(scores),
            "avg": sum(scores) / len(scores),
            "max": max(scores),
            "min": min(scores),
            "pass_rate": len([s for s in scores if s >= 60]) / len(scores) * 100,
        }

    def overall_stats(self):
        """整体统计"""
        students = list(self.students.values())
        if not students:
            return None
        all_courses = set()
        for s in students:
            for c in s.courses:
                all_courses.add(c.name)
        return {
            "total_students": len(students),
            "total_courses": len(all_courses),
            "course_list": sorted(all_courses),
            "avg_score": sum(s.avg_score for s in students) / len(students),
            "all_passed": len([s for s in students if s.passed_all]),
        }

    def __len__(self):
        return len(self.students)

4. FileManager 文件管理 (storage.py)

import json
import csv
import os
from models import Student

class FileManager:
    """文件管理器:JSON 持久化 + CSV 导入导出"""

    def __init__(self, filename="students.json"):
        self.filename = filename

    def save(self, manager):
        """保存到 JSON"""
        data = {
            "version": "1.0",
            "count": len(manager),
            "students": {sid: s.to_dict() for sid, s in manager.students.items()}
        }
        with open(self.filename, "w", encoding="utf-8") as f:
            json.dump(data, f, indent=2, ensure_ascii=False)
        print(f"💾 已保存 {len(manager)} 条记录到 {self.filename}")

    def load(self, manager):
        """从 JSON 加载"""
        if not os.path.exists(self.filename):
            print(f"📂 数据文件不存在,将创建新文件")
            return 0
        try:
            with open(self.filename, "r", encoding="utf-8") as f:
                data = json.load(f)
            count = 0
            for sid, s_data in data.get("students", {}).items():
                student = Student.from_dict(s_data)
                manager.students[sid] = student
                count += 1
            print(f"📂 已加载 {count} 条记录")
            return count
        except (json.JSONDecodeError, KeyError) as e:
            print(f"⚠️ 数据文件损坏: {e}")
            return 0

    def export_csv(self, manager, filename="students_export.csv"):
        """导出为 CSV"""
        with open(filename, "w", encoding="utf-8-sig", newline="") as f:
            writer = csv.writer(f)
            # 表头
            all_courses = set()
            for s in manager.students.values():
                for c in s.courses:
                    all_courses.add(c.name)
            course_list = sorted(all_courses)
            header = ["学号", "姓名", "年龄"] + course_list + ["总分", "平均分", "是否全部及格"]
            writer.writerow(header)
            # 数据
            for s in manager.students.values():
                row = [s.sid, s.name, s.age]
                for cname in course_list:
                    c = s.get_course(cname)
                    row.append(c.score if c else "")
                row.extend([s.total_score, f"{s.avg_score:.1f}", "是" if s.passed_all else "否"])
                writer.writerow(row)
        print(f"📤 已导出到 {filename}")

    def import_csv(self, manager, filename):
        """从 CSV 导入"""
        if not os.path.exists(filename):
            print(f"❌ 文件不存在: {filename}")
            return 0
        from models import Course
        count = 0
        with open(filename, "r", encoding="utf-8-sig") as f:
            reader = csv.DictReader(f)
            for row in reader:
                sid = row.get("学号", "").strip()
                name = row.get("姓名", "").strip()
                age = int(row.get("年龄", 0))
                if not sid or not name:
                    continue
                if sid not in manager.students:
                    manager.add_student(name, sid, age)
                for key, value in row.items():
                    if key not in ("学号", "姓名", "年龄", "总分", "平均分", "是否全部及格"):
                        if value and value.strip().replace(".", "").isdigit():
                            manager.add_grade(sid, key, float(value))
                count += 1
        print(f"📥 已导入 {count} 条记录")
        return count

5. MenuUI 菜单界面 (ui.py)

class MenuUI:
    """命令行菜单界面"""

    def __init__(self, manager, storage):
        self.manager = manager
        self.storage = storage

    def run(self):
        """主循环"""
        while True:
            self.show_menu()
            choice = input("\n请选择 (0-9): ").strip()
            actions = {
                "1": self.add_student,
                "2": self.add_grade,
                "3": self.view_student,
                "4": self.update_student,
                "5": self.delete_student,
                "6": self.search_student,
                "7": self.show_ranking,
                "8": self.show_stats,
                "9": self.import_export,
                "0": self.quit,
            }
            action = actions.get(choice)
            if action:
                action()
            else:
                print("❌ 无效选择,请输入 0-9")

    def show_menu(self):
        print("\n" + "=" * 50)
        print("📚 学生管理系统 v1.0")
        print("=" * 50)
        print(f"  当前学生: {len(self.manager)} 人")
        print("-" * 50)
        print("  1. ➕ 添加学生    2. 📝 添加/修改成绩")
        print("  3. 👤 查看学生    4. ✏️  修改信息")
        print("  5. 🗑️  删除学生    6. 🔍 搜索")
        print("  7. 🏆 成绩排名    8. 📊 统计分析")
        print("  9. 📤 导入导出    0. 🚪 退出")
        print("=" * 50)

    def add_student(self):
        print("\n➕ 添加学生")
        name = input("  姓名: ").strip()
        sid = input("  学号: ").strip()
        try:
            age = int(input("  年龄: ").strip())
        except ValueError:
            print("❌ 年龄必须是数字")
            return
        try:
            self.manager.add_student(name, sid, age)
            self.storage.save(self.manager)
            print(f"✅ 已添加: {name} ({sid})")
        except ValueError as e:
            print(f"❌ {e}")

    def add_grade(self):
        sid = input("\n📝 输入学号: ").strip()
        try:
            student = self.manager.get_student(sid)
        except KeyError as e:
            print(f"❌ {e}")
            return
        print(f"  当前: {student}")
        name = input("  课程名: ").strip()
        try:
            score = float(input("  成绩: ").strip())
        except ValueError:
            print("❌ 成绩必须是数字")
            return
        credit = input("  学分 (默认1): ").strip()
        credit = float(credit) if credit else 1.0
        self.manager.add_grade(sid, name, score, credit)
        self.storage.save(self.manager)
        print(f"✅ 已记录: {student.name} - {name} = {score}")

    def view_student(self):
        sid = input("\n👤 输入学号: ").strip()
        try:
            s = self.manager.get_student(sid)
            print(f"\n{'='*40}")
            print(f"  姓名: {s.name}")
            print(f"  学号: {s.sid}")
            print(f"  年龄: {s.age}")
            print(f"  创建: {s.created_at}")
            print(f"{'='*40}")
            if s.courses:
                print(f"  {'课程':10s} {'成绩':>6s} {'等级':>4s} {'状态':>4s}")
                print(f"  {'-'*28}")
                for c in sorted(s.courses, key=lambda x: -x.score):
                    print(f"  {c.name:10s} {c.score:6.1f} {c.grade:>4s} {'✅' if c.passed else '❌':>4s}")
                print(f"  {'-'*28}")
                print(f"  {'总分':10s} {s.total_score:6.1f}")
                print(f"  {'平均':10s} {s.avg_score:6.1f}")
            else:
                print("  暂无成绩记录")
        except KeyError as e:
            print(f"❌ {e}")

    def update_student(self):
        sid = input("\n✏️ 输入学号: ").strip()
        try:
            s = self.manager.get_student(sid)
            print(f"  当前: {s}")
            name = input(f"  新姓名 (回车保持 '{s.name}'): ").strip()
            age = input(f"  新年龄 (回车保持 '{s.age}'): ").strip()
            kwargs = {}
            if name: kwargs["name"] = name
            if age:
                try: kwargs["age"] = int(age)
                except ValueError: print("⚠️ 年龄必须是数字,跳过")
            if kwargs:
                self.manager.update_student(sid, **kwargs)
                self.storage.save(self.manager)
                print(f"✅ 已更新")
            else:
                print("  未修改")
        except KeyError as e:
            print(f"❌ {e}")

    def delete_student(self):
        sid = input("\n🗑️ 输入学号: ").strip()
        try:
            s = self.manager.get_student(sid)
            confirm = input(f"  确认删除 '{s.name}'?(y/n): ").strip().lower()
            if confirm == "y":
                self.manager.remove_student(sid)
                self.storage.save(self.manager)
                print(f"✅ 已删除: {s.name}")
        except KeyError as e:
            print(f"❌ {e}")

    def search_student(self):
        keyword = input("\n🔍 搜索关键词: ").strip()
        results = self.manager.search(keyword)
        if results:
            print(f"\n  找到 {len(results)} 条结果:")
            for s in results:
                print(f"    {s}")
        else:
            print("  ❌ 未找到")

    def show_ranking(self):
        students = self.manager.ranking()
        if not students:
            print("  📭 暂无数据")
            return
        print(f"\n🏆 成绩排名(共 {len(students)} 人)")
        print(f"  {'排名':4s} {'学号':8s} {'姓名':8s} {'总分':>6s} {'均分':>6s} {'课程数':>4s}")
        print("  " + "-" * 42)
        for i, s in enumerate(students, 1):
            medal = "🥇🥈🥉"[i-1] if i <= 3 else f"{i:2d}"
            print(f"  {medal:4s} {s.sid:8s} {s.name:8s} {s.total_score:6.1f} {s.avg_score:6.1f} {s.course_count:4d}")

    def show_stats(self):
        stats = self.manager.overall_stats()
        if not stats:
            print("  📭 暂无数据")
            return
        print(f"\n📊 整体统计")
        print(f"  学生总数: {stats['total_students']}")
        print(f"  课程总数: {stats['total_courses']}")
        print(f"  平均分: {stats['avg_score']:.1f}")
        print(f"  全部及格: {stats['all_passed']}人")
        print(f"\n  课程列表: {', '.join(stats['course_list'])}")
        for cname in stats["course_list"]:
            cs = self.manager.course_stats(cname)
            if cs:
                print(f"\n  📚 {cname}:")
                print(f"    人数: {cs['count']}  平均: {cs['avg']:.1f}  最高: {cs['max']:.1f}  最低: {cs['min']:.1f}  及格率: {cs['pass_rate']:.0f}%")

    def import_export(self):
        print("\n📤 导入导出")
        print("  1. 导出 CSV  2. 导入 CSV  3. 返回")
        choice = input("  请选择: ").strip()
        if choice == "1":
            self.storage.export_csv(self.manager)
        elif choice == "2":
            filename = input("  CSV 文件名: ").strip()
            self.storage.import_csv(self.manager, filename)
            self.storage.save(self.manager)

    def quit(self):
        self.storage.save(self.manager)
        print("\n👋 再见!数据已保存。")
        exit()

6. 完整主程序 (main.py)

"""
学生管理系统 v1.0
第一阶段毕业项目(Day 1-25)
"""
from manager import GradeManager
from storage import FileManager
from ui import MenuUI

def main():
    print("=" * 50)
    print("📚 学生管理系统 v1.0")
    print("=" * 50)

    # 初始化组件
    storage = FileManager("students.json")
    manager = GradeManager()
    ui = MenuUI(manager, storage)

    # 加载数据
    storage.load(manager)

    # 启动菜单
    ui.run()

if __name__ == "__main__":
    main()

7. 运行效果演示

$ python main.py

==================================================
📚 学生管理系统 v1.0
==================================================
📂 已加载 0 条记录

==================================================
📚 学生管理系统 v1.0
==================================================
  当前学生: 0 人
--------------------------------------------------
  1. ➕ 添加学生    2. 📝 添加/修改成绩
  3. 👤 查看学生    4. ✏️  修改信息
  5. 🗑️  删除学生    6. 🔍 搜索
  7. 🏆 成绩排名    8. 📊 统计分析
  9. 📤 导入导出    0. 🚪 退出
==================================================

请选择 (0-9): 1

➕ 添加学生
  姓名: 张三
  学号: 2024001
  年龄: 20
✅ 已添加: 张三 (2024001)

请选择 (0-9): 2

📝 输入学号: 2024001
  当前: [2024001] 张三, 20岁, 0科, 均分0.0, ✅ 全部及格
  课程名: Python
  成绩: 92
✅ 已记录: 张三 - Python = 92.0

请选择 (0-9): 7

🏆 成绩排名(共 1 人)
  排名 学号     姓名     总分   均分  课程数
  ------------------------------------------
  🥇 2024001  张三      92.0   92.0     1

8. 第一阶段总结 🎓

恭喜!你完成了 Python 基础语法的全部 25 天学习!

阶段
Day
主题
核心收获
🟢 入门
1
环境搭建
print、pip
2
变量与类型
int/float/str/bool
3
字符串
索引/切片/f-string
4
输入与运算符
input、算术/比较/逻辑
5
条件判断
if/elif/else
🟡 基础
6
for 循环
range、遍历
7
while 循环
break/continue
8-11
数据结构
list/tuple/dict/set
12
综合练习
猜数字、计算器
13-15
函数
def/args/kwargs/lambda/闭包
16-17
文件+异常
open/with/try/except
18-20
模块+推导式
import/pip/推导式/生成器
🟣 OOP
21
类与对象
class/__init__/self
22
方法与封装
@classmethod/@property/私有
23
继承与多态
super/重写/多继承/MRO
24
魔术方法
__str__/__eq__/__add__/__call__
25
综合项目
学生管理系统(全部知识点串联)

🎓 第一阶段毕业感言:

25 天前,你写了第一行 print("Hello World")
今天,你已经能用 OOP 架构写出完整的管理系统——有数据模型、业务逻辑、文件持久化、用户界面。

这不是终点,而是起点。
从 Day 26 开始,我们将进入Python 进阶的世界——正则表达式、JSON/CSV 处理、datetime、迭代器、装饰器、多线程、网络编程...

你已经打下了坚实的基础,接下来的旅程会更精彩!🚀

🔮 预告: Day 26 正则表达式基础 — re 模块、元字符、match/search/findall。文本处理的瑞士军刀!

轻松时刻:

请在微信客户端打开

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 00:57:18 HTTP/2.0 GET : https://f.mffb.com.cn/a/497435.html
  2. 运行时间 : 0.114491s [ 吞吐率:8.73req/s ] 内存消耗:4,446.80kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=9c3ab878cc6b60bbc18b234650f66315
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000602s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000783s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.011048s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000377s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000643s ]
  6. SELECT * FROM `set` [ RunTime:0.000212s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000581s ]
  8. SELECT * FROM `article` WHERE `id` = 497435 LIMIT 1 [ RunTime:0.017373s ]
  9. UPDATE `article` SET `lasttime` = 1783011438 WHERE `id` = 497435 [ RunTime:0.010303s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000366s ]
  11. SELECT * FROM `article` WHERE `id` < 497435 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000520s ]
  12. SELECT * FROM `article` WHERE `id` > 497435 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000382s ]
  13. SELECT * FROM `article` WHERE `id` < 497435 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000930s ]
  14. SELECT * FROM `article` WHERE `id` < 497435 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001791s ]
  15. SELECT * FROM `article` WHERE `id` < 497435 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001007s ]
0.116116s