当前位置:首页>python>Python 零基础 100 天 — Day 2变量与数据类型

Python 零基础 100 天 — Day 2变量与数据类型

  • 2026-06-30 17:44:34
Python 零基础 100 天 — Day 2变量与数据类型

📦 变量与数据类型:给程序装上"记忆"

🕐 预计用时:2-3 小时 | 🎯 今日目标:掌握变量、四大基本数据类型、类型转换


📖 今日目录

  1. 变量是什么?——贴了标签的盒子
  2. Python 四大基本数据类型
  3. type() 函数:给数据"验明正身"
  4. 变量命名规范
  5. 类型转换:数据的"变形术"
  6. 动态类型:Python 的"自由灵魂"
  7. input() 函数:让程序听你说话
  8. 今日练习
  9. 今日小结

1. 变量是什么?——贴了标签的盒子

变量就像贴了标签的盒子,每个盒子里装着不同的东西

📦 最简单的比喻

想象你有一堆盒子,每个盒子上贴了一张标签。你可以在盒子里放任何东西——数字、文字、真假值……

变量 = 标签名,盒子里面的东西 = 值。

# 这就是变量!name = "小明"       # 标签"name"的盒子里装了文字"小明"age = 18            # 标签"age"的盒子里装了数字18height = 1.75       # 标签"height"的盒子里装了小数1.75is_student = True   # 标签"is_student"的盒子里装了"是"

💡 赋值符号 = 不是"等于"!在 Python 里,= 的意思是"把右边的东西放进左边的盒子里"。age = 18 读作"把 18 装进 age 这个盒子",而不是"age 等于 18"。真正的"等于"在 Python 里用 ==(两个等号),后面会学到。

🔧 变量的基本操作

# 创建变量name = "小明"age = 18# 使用变量print(name)         # 输出: 小明print(age)          # 输出: 18# 变量可以重新赋值(盒子里的东西可以换)age = 19            # 把盒子里的 18 换成了 19print(age)          # 输出: 19# 变量可以参与计算price = 10quantity = 3total = price * quantityprint(total)        # 输出: 30

🎯 一句话记住变量:变量就是给一块数据取个名字,方便后面反复使用。就像你不会每次都说"住在XX路XX号的那个人",而是直接叫"小明"。

📐 变量的"拆箱"过程

x = 10        # 第一步:创建盒子,标签写"x",放进 10y = x         # 第二步:把 x 盒子里的东西复制一份,放进 y 盒子x = 20        # 第三步:把 x 盒子里的东西换成 20print(x)      # 输出: 20print(y)      # 输出: 10  (y 不受影响!因为它是复制的)

🤔 为什么 y 还是 10?因为 y = x 是"复制",不是"共享"。就像你把一本书复印了一份给朋友——你后来在自己的书上涂了笔记,朋友那份还是干净的。


2. Python 四大基本数据类型

数据类型就像给东西分类——不同类的东西有不同的用法

Python 里的数据有不同类型,就像现实世界里东西有不同的种类。今天我们认识四个最基本的"种类":

类型
英文名
生活比喻
例子
整数
int
数人头、数钱(整的)
18
-50
浮点数
float
身高、体重、温度(带小数点)
1.75
-3.140.0
字符串
str
文字、句子、任何带引号的东西
"hello"
'小明'
布尔值
bool
对或错、是或否、开或关
True
False

🔢 整数(int)——数得清的东西

age = 18score = 100temperature = -10count = 0# 整数可以做各种数学运算print(10 + 3)     # 加法: 13print(10 - 3)     # 减法: 7print(10 * 3)     # 乘法: 30print(10 / 3)     # 除法: 3.3333...(结果是浮点数!)print(10 // 3)    # 整除: 3(只取整数部分)print(10 % 3)     # 取余: 1(10 除以 3 余 1)print(10 ** 3)    # 幂运算: 1000(10的3次方)

💡 注意! 整数除以整数(/)结果会自动变成浮点数。10 / 2 的结果是 5.0,不是 5想要整数结果?用 //(整除):10 // 2 = 5

📐 浮点数(float)——带小数点的数

height = 1.75weight = 65.5pi = 3.14159price = 9.99# 浮点数也可以做运算print(1.5 + 2.3)   # 3.8print(3.0 * 2.0)   # 6.0print(0.1 + 0.2)   # 0.30000000000000004 🤯

⚠️ 经典的 0.1 + 0.2 问题!0.1 + 0.2 的结果不是 0.3,而是 0.30000000000000004这不是 Python 的 bug,而是计算机存储小数的方式导致的精度问题。就像你用 10 进制无法精确表示 1/3(0.3333...)一样,计算机用 2 进制无法精确表示 0.1。不用担心!日常使用中,可以用 round() 函数来处理:round(0.1 + 0.2, 1) → 0.3

📝 字符串(str)——文字的世界

name = "小明"greeting = '你好'message = "Hello, World!"# 字符串可以用 + 号拼接first_name = "张"last_name = "三"full_name = first_name + last_nameprint(full_name)    # 输出: 张三# 字符串可以用 * 号重复line = "-" * 20print(line)         # 输出: --------------------

🎈 字符串的三种引号:"双引号" — 最常用'单引号' — 和双引号一样"""三引号""" — 可以换行的长文本选哪个?看心情!但要注意:引号必须配对,不能 "hello'

✅ 布尔值(bool)——非黑即白

is_student = True       # 是学生is_raining = False      # 没下雨has_money = True        # 有钱# 布尔值常用于条件判断print(10 > 5)       # True(10 大于 5 吗?是的)print(3 == 5)       # False(3 等于 5 吗?不是)print(10 != 3)      # True(10 不等于 3 吗?是的)print("hello" == "hello")  # Trueprint(True and False)      # False(两个都是True才为True)print(True or False)       # True(有一个True就为True)print(not True)            # False(取反)

💡 布尔值的大小写很重要!✅ True — 首字母大写✅ False — 首字母大写❌ true — 这不是布尔值,只是一个普通的变量名!❌ TRUE — 这也不是!Python 区分大小写。


3. type() 函数:给数据"验明正身"

用 type() 函数查看变量到底是什么类型

有时候你不确定一个变量是什么类型,Python 提供了 type() 函数来帮你"验明正身":

# 查看各种数据的类型print(type(42))          # <class 'int'>     → 整数print(type(3.14))        # <class 'float'>   → 浮点数print(type("hello"))     # <class 'str'>     → 字符串print(type(True))        # <class 'bool'>    → 布尔值# 也可以查看变量的类型name = "小明"age = 18print(type(name))        # <class 'str'>print(type(age))         # <class 'int'>

🎯 什么时候用 type()?当你发现程序结果不对劲的时候,第一步就是用 type() 检查变量类型。比如:print("年龄:" + age) 报错了?用 type(age) 一看——原来是 int,不是 str

🔍 isinstance():更优雅的类型检查

# isinstance() 可以判断变量是否属于某个类型age = 18print(isinstance(age, int))      # Trueprint(isinstance(age, str))      # Falsename = "小明"print(isinstance(name, str))     # True

💡 type() 和 isinstance() 的区别:type(x) == int — 严格匹配,x 必须是 intisinstance(x, int) — 宽松匹配,x 是 int 或 int 的子类都行新手用 type() 就够了,等你学到面向对象再深入了解 isinstance()


4. 变量命名规范

好的变量名就像好的路标——一看就知道通向哪里

给变量起名是有讲究的,不能随便乱来:

✅ 命名规则(必须遵守)

规则
正确 ✅
错误 ❌
只能包含字母、数字、下划线
my_namemy-name
my name
不能以数字开头
name11name
不能使用 Python 关键字
my_classclass
iffor
区分大小写
name
 和 Name 是不同的变量

🎨 命名风格(推荐遵守)

# ✅ 蛇形命名(snake_case):单词之间用下划线连接user_name = "小明"          # 好!清晰明了student_age = 18            # 好!total_price = 99.9          # 好!# ❌ 不推荐的命名userName = "小明"           # 驼峰命名(JavaScript 风格,Python 不推荐)UserName = "小明"           # 帕斯卡命名(Java 风格,Python 不推荐)a = "小明"                  # 太短!谁知道 a 是什么?abcdefghijklmnopqrstuvwxyz = "小明"  # 太长!打字累死人

💡 蛇形命名是 Python 的"官方推荐"。Python 的设计哲学是"做一件事应该有且仅有一种显而易见的方式",在变量命名上,这种方式就是 snake_case(蛇形命名)。

🚫 Python 关键字(不能用作变量名)

# 这些是 Python 的"保留字",不能拿来当变量名import keywordprint(keyword.kwlist)# 输出(Python 3.13):# ['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await',#  'break', 'class', 'continue', 'def', 'del', 'elif', 'else',#  'except', 'finally', 'for', 'from', 'global', 'if', 'import',#  'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise',#  'return', 'try', 'while', 'with', 'yield']

💡 好名字 vs 坏名字

# ❌ 坏名字:看不出含义a = 18b = "小明"c = True# ✅ 好名字:一看就懂age = 18student_name = "小明"is_enrolled = True# ❌ 坏名字:太模糊data = [1, 2, 3]temp = "hello"# ✅ 好名字:精确描述student_scores = [1, 2, 3]welcome_message = "hello"

🎯 起名口诀:一看就懂,不用猜。age 比 a 好,student_count 比 sc 好。宁可长一点,也不要让人看不懂。


5. 类型转换:数据的"变形术"

类型转换就像把不同形状的积木互相变换

不同类型的数据之间可以互相转换,就像把水倒进不同形状的杯子里:

🔄 四种转换函数

函数
作用
例子
结果
int()
转为整数
int(3.7)3
(直接砍掉小数,不是四舍五入!)
float()
转为浮点数
float(5)5.0
str()
转为字符串
str(100)"100"
bool()
转为布尔值
bool(0)False

🔢 int() 转换详解

# 浮点数 → 整数(砍掉小数部分)print(int(3.7))      # 3(不是 4!直接砍,不四舍五入)print(int(3.2))      # 3print(int(-2.9))     # -2# 字符串 → 整数(字符串必须长得像数字)print(int("42"))     # 42print(int("-10"))    # -10# ❌ 这些会报错!# int("hello")       # ValueError!"hello" 不像数字# int("3.14")        # ValueError!带小数点的字符串不能直接转 int# int("")            # ValueError!空字符串不行

📐 float() 转换详解

# 整数 → 浮点数print(float(5))      # 5.0print(float(0))      # 0.0# 字符串 → 浮点数print(float("3.14")) # 3.14print(float("100"))  # 100.0print(float("-2.5")) # -2.5

📝 str() 转换详解

# 任何类型都可以转为字符串print(str(42))       # "42"print(str(3.14))     # "3.14"print(str(True))     # "True"print(str(None))     # "None"# 实际应用:拼接数字和文字age = 18print("我今年" + str(age) + "岁")  # 我今年18岁# 如果不转换:print("我今年" + age + "岁")  → 报错!

⚠️ 最常见的错误!

age = 18print("年龄:" + age)  # ❌ TypeError! 字符串不能和数字拼接print("年龄:" + str(age))  # ✅ 正确!先转成字符串

✅ bool() 转换详解

# 以下值转为 bool 是 False(记住这些"假值"!)print(bool(0))       # False(数字0)print(bool(0.0))     # False(浮点0)print(bool(""))      # False(空字符串)print(bool(None))     # False(None 表示"没有")# 其他所有值都是 Trueprint(bool(1))       # Trueprint(bool(-5))      # True(负数也是True!)print(bool("hello")) # Trueprint(bool(" "))     # True(空格也是字符,不是空字符串)

💡 bool() 的记忆口诀:"零空无假"0(零)、""(空字符串)、None(无)→ False其他所有东西 → True


6. 动态类型:Python 的"自由灵魂"

🎭 什么是动态类型?

有些语言(如 Java、C++)要求你提前声明变量的类型,就像你去酒店入住必须先登记身份证:

// Java 风格(静态类型,需要声明类型)int age = 18;           // 必须说清楚 age 是整数String name = "小明";    // 必须说清楚 name 是字符串// age = "hello";        // ❌ 报错!age 已经被定义为整数,不能放字符串

Python 是动态类型语言,不需要声明类型,就像你去朋友家串门——随便坐,不用登记:

# Python 风格(动态类型,不需要声明类型)age = 18                # age 现在是整数print(type(age))        # <class 'int'>age = "十八岁"           # 没问题!age 现在变成了字符串print(type(age))        # <class 'str'>age = 18.5              # 又变了!现在是浮点数print(type(age))        # <class 'float'>

🎯 动态类型的优缺点:✅ 优点:灵活方便,写起来快❌ 缺点:容易犯错(你可能不小心把数字变成了字符串)所以养成用 type() 检查变量的习惯很重要!


7. input() 函数:让程序听你说话

🎤 input() 是什么?

input() 让程序暂停运行,等待用户输入内容。

就像你问朋友一个问题,然后等他回答:

# 最简单的用法name = input("请输入你的名字: ")print("你好," + name + "!")

运行效果:

请输入你的名字: 小明    ← 这里你输入"小明"然后按回车你好,小明!             ← 程序输出

⚠️ 重要:input() 返回的永远是字符串!

# input() 返回的类型是 str(字符串),不是数字!age = input("请输入你的年龄: ")print(type(age))    # <class 'str'>  ← 是字符串,不是整数!# 如果要做数学运算,需要手动转换age = int(input("请输入你的年龄: "))   # 用 int() 转换print(type(age))    # <class 'int''>  ← 现在是整数了print("明年你", age + 1, "岁")         # 可以做数学运算了

⚠️ 最常见的坑!

num = input("输入一个数字: ")  # 用户输入 10print(num + 5)                  # ❌ TypeError! 字符串 "10" 不能和数字 5 相加print(int(num) + 5)             # ✅ 正确!先转换再运算

🎈 input() 的工作流程:1. 显示括号里的提示文字2. 程序暂停,等你输入3. 你输入内容,按回车4. 你输入的内容(作为字符串)被存到变量里Day 4 会更详细地讲解 input() 的各种用法!


8. 今日练习

🏋️ 练习 1:自我介绍(升级版)

创建 day02_practice.py,用变量存储信息,然后打印自我介绍:

# 用变量存储个人信息name = "小明"age = 18height = 1.75is_student = True# 打印自我介绍print("=== 自我介绍 ===")print("姓名:", name)print("年龄:", age)print("身高:", height, "米")print("是学生吗:", is_student)print("类型检查:", type(name), type(age), type(height), type(is_student))

🏋️ 练习 2:温度转换器

把华氏温度转换为摄氏温度(公式:摄氏 = (华氏 - 32) × 5/9):

# 温度转换fahrenheit = 98.6celsius = (fahrenheit - 32) * 5 / 9print(fahrenheit, "华氏度 =", round(celsius, 1), "摄氏度")

🏋️ 练习 3:购物计算器

# 购物小票item = "Python入门书"price = 49.9quantity = 2total = price * quantitydiscount = 0.8   # 八折final_price = total * discountprint("商品:", item)print("单价:", price, "元")print("数量:", quantity, "本")print("总价:", total, "元")print("折扣:", discount)print("实付:", round(final_price, 2), "元")

🏋️ 练习 4:布尔值大冒险

# 预测下面每行输出什么,然后运行验证print(bool(0))         # ?print(bool(1))         # ?print(bool(-1))        # ?print(bool(""))        # ?print(bool("0"))       # ?print(bool("False"))   # ?print(bool(None))      # ?print(bool([]))        # ?print(bool([1, 2]))    # ?

🏋️ 练习 5:变量交换

# 交换两个变量的值(Python 的魔法写法!)a = 10b = 20print("交换前: a =", a, ", b =", b)# 方法一:用临时变量(传统方法)temp = aa = bb = tempprint("交换后: a =", a, ", b =", b)# 方法二:Python 的一行交换(酷!)a, b = b, aprint("再交换: a =", a, ", b =", b)

9. 今日小结

📋 今天你学到了什么?

知识点
一句话总结
变量
贴了标签的盒子,用 = 把值装进去
int(整数)
没有小数点的数字,如 18-5
float(浮点数)
带小数点的数字,如 3.141.75
str(字符串)
用引号包裹的文字,如 "hello"
bool(布尔值)
只有 True 和 False 两个值
type()
查看变量是什么类型
变量命名
蛇形命名 snake_case,见名知意
类型转换
int()
float()str()bool()
动态类型
变量不需要声明类型,可以随时改变
input()
获取用户输入,返回的永远是字符串

🧠 自检清单

⬜ 知道什么是变量,理解 = 是赋值不是等于

⬜ 能说出 Python 四大基本数据类型及各自特点

⬜ 会用 type() 查看变量类型

⬜ 知道变量命名要用蛇形命名 snake_case

⬜ 能用 int()float()str()bool() 做类型转换

⬜ 记住 bool() 的口诀:"零空无假"

⬜ 知道 input() 返回的是字符串

⬜ 知道 0.1 + 0.2 != 0.3 是精度问题,不是 bug

🎯 Day 3 预告

明天我们将学习 字符串的进阶操作——切片、格式化、常用方法……让你的文字处理能力飞起来!✂️


🌟 彩蛋:Python 的"类型彩蛋"

# Python 的 True 和 False 其实是数字!print(True + True)    # 2(True 是 1)print(True + False)   # 1(False 是 0)print(True * 10)      # 10# 所以你可以用 True 做数学题(虽然没什么用)print(True + True + True + False + True)  # 4

✨ 冷知识:在 Python 里,True 就是 1False 就是 0所以布尔值其实是一种特殊的整数!这就像"开关"——开(1)和关(0),本质上就是数字。


📅 Day 2 完成!你的程序现在能"记住"东西了。明天见! 🚀

轻松时刻:

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 21:57:19 HTTP/2.0 GET : https://f.mffb.com.cn/a/493211.html
  2. 运行时间 : 0.764832s [ 吞吐率:1.31req/s ] 内存消耗:4,516.12kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=30305eade758dd63d3123eee16dd327b
  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.000358s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000522s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.012725s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.011102s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000594s ]
  6. SELECT * FROM `set` [ RunTime:0.013025s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000813s ]
  8. SELECT * FROM `article` WHERE `id` = 493211 LIMIT 1 [ RunTime:0.119813s ]
  9. UPDATE `article` SET `lasttime` = 1783087040 WHERE `id` = 493211 [ RunTime:0.011114s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.009592s ]
  11. SELECT * FROM `article` WHERE `id` < 493211 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.073372s ]
  12. SELECT * FROM `article` WHERE `id` > 493211 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.151991s ]
  13. SELECT * FROM `article` WHERE `id` < 493211 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.036799s ]
  14. SELECT * FROM `article` WHERE `id` < 493211 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.123179s ]
  15. SELECT * FROM `article` WHERE `id` < 493211 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.119880s ]
0.767238s