当前位置:首页>python>Python 零基础100天—Day92 Git 版本控制

Python 零基础100天—Day92 Git 版本控制

  • 2026-09-02 16:23:58
Python 零基础100天—Day92 Git 版本控制

🐍 Python Day92:Git 版本控制 — 代码的时光机

🕐 预计用时:3-4 小时 | 🎯 目标:掌握 Git 基本操作、分支策略、团队协作流程


📖 今日目录

  1. 为什么需要版本控制?
  2. Git 核心概念
  3. 基本操作
  4. 分支管理
  5. 远程仓库
  6. 协作流程
  7. Git 实用技巧
  8. .gitignore
  9. 今日练习
  10. 今日小结

1. 为什么需要版本控制?

你写代码时有没有过这种经历?

project_v1.py
project_v2.py
project_v2_修改版.py
project_v2_修改版_最终版.py
project_v2_修改版_最终版_真的最终版.py

Git 就是来解决这个问题的——它记录你每一次修改,你可以随时回到任何一个时间点,还可以多人同时改同一个项目而不冲突。

没有 Git
有 Git
文件名带版本号
自动记录每个版本
改坏了?手动恢复
改坏了?一键回滚
用 U 盘/网盘传代码
远程仓库统一管理
多人协作靠"你先改完我再改"
同时改,自动合并

2. Git 核心概念

2.1 三个区域

┌──────────┐    git add    ┌──────────┐   git commit   ┌──────────┐
│ 工作区    │ ──────────→ │ 暂存区    │ ──────────→  │ 仓库      │
│ Working   │             │ Staging   │              │ Repository│
│ Directory │ ←────────── │ Index     │ ←──────────  │           │
└──────────┘  git checkout └──────────┘  git reset   └──────────┘
     │
     │  ← 你编辑文件的地方
     │
  • 工作区(Working Directory)
    :你看到的文件,正在编辑的
  • 暂存区(Staging Area)
    :准备好要提交的改动
  • 仓库(Repository)
    :永久保存的历史记录

2.2 文件状态

未跟踪 (Untracked)  →  暂存 (Staged)  →  已提交 (Committed)
  新文件                git add            git commit
  还没被 Git 管理        准备好了            存入历史

3. 基本操作

3.1 初始化

# 在项目目录初始化 Git
cd my-project
git init

# 查看状态
git status

# 配置用户信息(首次使用)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

3.2 添加和提交

# 创建文件
echo "# My Project" > README.md
echo "print('hello')" > app.py

# 查看状态
git status
# On branch master
# Untracked files:
#   README.md
#   app.py

# 添加到暂存区
git add README.md        # 添加单个文件
git add .                # 添加所有文件

# 提交到仓库
git commit -m "初始提交:创建项目"

# 查看提交历史
git log --oneline
# a1b2c3d 初始提交:创建项目

3.3 修改和撤销

# 修改文件
echo "print('hello world')" > app.py

# 查看改了什么
git diff                 # 工作区 vs 暂存区
git diff --staged        # 暂存区 vs 上次提交

# 添加修改
git add app.py

# 提交
git commit -m "修改 app.py"

# 撤销工作区的修改(回到上次提交的状态)
git checkout -- app.py

# 撤销暂存(从暂存区移回工作区)
git reset HEAD app.py

3.4 版本回退

# 查看提交历史
git log --oneline
# f4e5d6c 添加新功能
# a1b2c3d 初始提交

# 回退到某个版本(保留修改)
git reset --soft a1b2c3d

# 回退到某个版本(丢弃修改,危险!)
git reset --hard a1b2c3d

# 查看所有操作历史(包括回退)
git reflog

⚠️ git reset --hard 会丢失修改!永远不要在没有备份的情况下对公共分支使用。用 git stash 先暂存修改更安全。


4. 分支管理

4.1 分支是什么?

分支就像平行宇宙——你在自己的分支上随便折腾,不影响主线。搞定了再合并回来。

main:     A ── B ── C ──────────────── F (合并)
                       \              /
feature:                D ── E ─────┘
                        你在分支上开发新功能

4.2 分支操作

# 查看分支
git branch
# * main          ← 当前分支

# 创建新分支
git branch feature-login

# 切换分支
git checkout feature-login
# 或者(Git 2.23+)
git switch feature-login

# 创建并切换(一步到位)
git checkout -b feature-login

# 在分支上开发
echo "def login(): pass" > auth.py
git add auth.py
git commit -m "添加登录功能"

# 切回主分支
git checkout main

# 合并分支
git merge feature-login

# 删除已合并的分支
git branch -d feature-login

4.3 合并冲突

# 两个人同时改了同一个文件的同一行
# main 分支:
print("Hello from main")

# feature 分支:
print("Hello from feature")

# 合并时会冲突
git merge feature
# CONFLICT (content): Merge conflict in app.py

# 打开文件,手动解决冲突
<<<<<<< HEAD
print("Hello from main")
=======
print("Hello from feature")
>>>>>>> feature

# 改成你想要的样子,然后:
git add app.py
git commit -m "解决合并冲突"

5. 远程仓库

5.1 GitHub / Gitee

# 在 GitHub 创建仓库后,关联远程仓库
git remote add origin https://github.com/yourname/my-project.git

# 推送到远程(第一次加 -u 设置默认)
git push -u origin main

# 之后直接
git push

# 从远程拉取
git pull

# 克隆别人的项目
git clone https://github.com/username/repo.git

5.2 SSH 配置(推荐)

# 生成 SSH 密钥
ssh-keygen -t ed25519 -C "your@email.com"

# 查看公钥
cat ~/.ssh/id_ed25519.pub

# 复制公钥,添加到 GitHub → Settings → SSH Keys

# 测试连接
ssh -T git@github.com
# Hi yourname! You've successfully authenticated...

# 用 SSH 地址关联
git remote add origin git@github.com:yourname/my-project.git

6. 协作流程

6.1 Fork + Pull Request(开源协作)

1. Fork 别人的仓库(GitHub 上点 Fork)
2. Clone 你 Fork 的仓库
   git clone https://github.com/YOURNAME/repo.git
3. 创建新分支
   git checkout -b fix-typo
4. 修改代码,提交,推送
   git push origin fix-typo
5. 在 GitHub 上创建 Pull Request
6. 等待原作者 review 和合并

6.2 Git Flow(团队开发)

main          ← 生产环境(只放稳定版本)
  │
  ├── develop   ← 开发主线
  │     │
  │     ├── feature/login    ← 功能分支
  │     ├── feature/search   ← 功能分支
  │     └── feature/payment  ← 功能分支
  │
  ├── release/1.0   ← 发布准备
  │
  └── hotfix/bug-123 ← 紧急修复

流程:
1. 从 develop 拉功能分支
2. 开发完成后合并回 develop
3. 准备发布时从 develop 拉 release 分支
4. 测试通过后合并到 main 并打 tag
5. 紧急 bug 从 main 拉 hotfix 分支

6.3 GitHub Flow(简单版,推荐)

main          ← 永远可部署
  │
  └── feature-xxx  ← 从 main 拉分支
        │
        ├── commit 1
        ├── commit 2
        └── commit 3
              │
              └── Pull Request → Review → Merge to main

适合: 持续部署的 Web 项目、小团队

7. Git 实用技巧

7.1 git stash(临时暂存)

# 改到一半,需要切分支修 bug
git stash                    # 暂存当前修改
git checkout hotfix-branch   # 切去修 bug
# ... 修完 ...
git checkout main
git stash pop                # 恢复之前的修改

# 查看暂存列表
git stash list

# 恢复指定暂存
git stash apply stash@{0}

7.2 git tag(版本标签)

# 打标签
git tag v1.0.0
git tag v1.0.0 -m "第一个正式版本"

# 推送标签到远程
git push origin v1.0.0
git push --tags               # 推送所有标签

# 查看标签
git tag

7.3 git blame(谁改的)

# 查看每一行是谁最后修改的
git blame app.py
# a1b2c3d (Alice 2026-01-15) def hello():
# f4e5d6c (Bob   2026-02-20)     print("world")

7.4 git bisect(二分查找 bug)

# 找到引入 bug 的那个 commit
git bisect start
git bisect bad                # 当前版本有 bug
git bisect good v1.0.0        # v1.0.0 没有 bug
# Git 会自动二分,你只需要测试每个版本是 good 还是 bad
# 测试完后
git bisect reset

8. .gitignore

有些文件不应该被 Git 跟踪(编译产物、密码、缓存等)。.gitignore 文件告诉 Git 忽略它们。

# .gitignore 模板

# Python
__pycache__/
*.py[cod]
*$py.class
*.egg-info/
dist/
build/
*.egg

# 虚拟环境
venv/
.venv/
env/

# IDE
.vscode/
.idea/
*.swp
*.swo

# 环境变量(密码!)
.env
.env.local

# 日志
*.log

# 数据库
*.sqlite3
*.db

# OS 文件
.DS_Store
Thumbs.db
# 如果文件已经被跟踪,需要先移除缓存
git rm --cached .env
git commit -m "移除 .env 文件"

🎯 .gitignore 最佳实践:项目一开始就创建 .gitignore!不要等到 .env 已经被提交了才想起来。GitHub 提供了各种语言的模板:https://github.com/github/gitignore


9. 今日练习

练习 1:创建 Git 仓库

在你的 Python 项目目录执行 git init,完成一次完整的 add → commit → push 流程。

练习 2:分支操作

创建一个 feature 分支,修改代码后合并回 main,模拟一次团队协作。

练习 3:GitHub PR

在 GitHub 上 Fork 一个开源项目,修改 README 后提交 Pull Request。


10. 今日小结

命令
作用
使用频率
git init
初始化仓库
⭐ 一次
git add
添加到暂存区
⭐⭐⭐⭐⭐ 每次提交
git commit -m
提交
⭐⭐⭐⭐⭐ 每次提交
git push
推送到远程
⭐⭐⭐⭐ 每天
git pull
拉取远程更新
⭐⭐⭐⭐ 每天
git branch
管理分支
⭐⭐⭐ 常用
git merge
合并分支
⭐⭐⭐ 常用
git stash
临时暂存
⭐⭐ 偶尔
git log
查看历史
⭐⭐⭐ 常用

🎯 一句话总结:Git 是代码的时光机——add 选择要保存的,commit 拍快照,branch 开平行宇宙,merge 合并宇宙,push/pull 同步到云端。

🔮 明天预告:Day93 我们学习性能优化——profiling 定位瓶颈、内存管理、常见优化技巧、缓存策略。让你的 Python 代码飞起来!

最新文章

随机文章

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