当前位置:首页>python>绝了!Python的“乐高积木”:7大数据类型详解,从菜鸟到高手的必经之路

绝了!Python的“乐高积木”:7大数据类型详解,从菜鸟到高手的必经之路

  • 2026-04-20 18:49:23
绝了!Python的“乐高积木”:7大数据类型详解,从菜鸟到高手的必经之路

你的第一行Python代码,从理解数据开始

2026年,编程已成为新时代的“必备素养”,而Python凭借其简洁优雅的语法,稳坐“最适合入门的编程语言”宝座。但你是否曾在代码的海洋中迷失,面对各种报错束手无策?

80%的错误源于对数据类型理解不清。今天,让我们用一篇万字长文,彻底搞懂Python的数据类型,为你的编程之路打下最坚实的基础。


第一章:变量——数据的“标签”与“容器”

Python的变量就像便利贴,你可以把它贴在任何一个物体上,而这个物体才是真正的数据。”这是理解Python数据类型最重要的一步。

1.1 变量赋值:给数据贴上“标签”

# 你的第一行赋值语句name = "张三"  # 给名字贴上标签age = 25       # 给年龄贴上标签height = 1.75  # 给身高贴上标签

关键理解:在Python中,变量本身没有类型,它只是指向某个内存对象的“标签”。我们说的“数据类型”,其实是那个对象的类型。

# 一个变量可以指向任何类型的对象x = 100       # 现在x指向一个整数x = 3.14      # 现在x指向一个浮点数x = "hello"   # 现在x指向一个字符串# 看,x本身没变,只是贴在了不同物体上

1.2 多个变量赋值:Python的“魔术手法”

# 魔法1:多个变量指向同一个值a = b = c = 2026# 这行代码相当于:先创建整数2026,然后让a、b、c三个便利贴都贴在上面# 魔法2:同时为多个变量贴不同标签name, age, score = "李四"2095.5# 相当于:name = "李四", age = 20, score = 95.5# 这个特性是Python独有的优雅,让代码更简洁

1.3 如何查看数据的“身份证”?——type()函数

# 想知道你处理的是什么类型的数据?用type()函数x = 10y = 3.14name = "Python"is_student = Trueprint(type(x))          # <class 'int'> → 这是整数print(type(y))          # <class 'float'> → 这是浮点数print(type(name))       # <class 'str'> → 这是字符串print(type(is_student)) # <class 'bool'> → 这是布尔值

第二章:六大核心数据类型——Python的“六脉神剑”

Python有六个标准数据类型,分为两大阵营:不可变可变。理解这个区别,是写出高效Python代码的关键。

数据类型

可变性

特征

适用场景

数字(Number)

不可变

整数、浮点数、布尔、复数

数学计算

字符串(String)

不可变

文本数据

文本处理

元组(Tuple)

不可变

有序集合,元素不可修改

存储常量数据

列表(List)

可变

有序集合,元素可修改

存储可变序列

字典(Dictionary)

可变

键值对映射

快速查找数据

集合(Set)

可变

无序、不重复元素

去重、集合运算

2.1 Number(数字):数学运算的基石

Python3中的数字类型包括:

# 整数(int)—— Python3没有长整型,全是intscore = 100year = 2026large_number = 10**100  # 10的100次方,Python也能轻松处理# 浮点数(float)—— 带小数点的数字price = 199.99pi = 3.1415926535# 布尔值(bool)—— 只有True和Falseis_available = Trueis_deleted = False# 复数(complex)—— 数学和工程计算专用complex_num = 3 + 4j

2026年特别提示:Python3中,bool其实是int的子类!这是个有趣但需要注意的特性:

# 布尔值是整数的子类print(issubclass(boolint))  # True# 这意味着True和1是相等的print(True == 1)  # Trueprint(False == 0)  # True# 甚至可以相加print(True + 1)  # 2print(False + 1)  # 1# 但要注意:相等不意味着是同一个对象print(1 is True)  # False(会有警告)print(0 is False)  # False(会有警告)# 警告告诉你:应该用==而不是is比较值

数值运算:Python的数学运算直观易懂

# 基本运算print(5 + 4)   # 加法:9print(5 - 3)   # 减法:2print(3 * 4)   # 乘法:12print(10 / 3)  # 除法:3.333...(总是返回浮点数)print(10 // 3) # 整除:3print(10 % 3)  # 取余:1print(2 ** 3)  # 幂运算:8# 混合运算自动提升类型result = 5 + 3.14  # 整数5自动转为浮点数5.0print(result)  # 8.14print(type(result))  # <class 'float'>

2.2 String(字符串):文本处理的艺术

字符串是编程中最常用的数据类型,Python为其提供了丰富的功能:

# 定义字符串name1 = 'Python'     # 单引号name2 = "Python"     # 双引号paragraph = """这是多行字符串"""           # 三引号,保留换行# 字符串索引和切片text = "Hello, Python!"print(text[0])     # H,第一个字符print(text[-1])    # !,最后一个字符print(text[0:5])   # Hello,切片:索引0到4print(text[7:])    # Python!,从索引7到最后print(text[:5])    # Hello,从开始到索引4print(text[::-1])  # !nohtyP ,olleH,反转字符串# 字符串运算str1 = "Hello"str2 = "World"print(str1 + " " + str2)  # Hello World,连接print(str1 * 3)           # HelloHelloHello,重复print("Py" in text)       # True,成员检查

不可变性:字符串一旦创建就不能修改

text = "Python"# text[0] = "J"  # 报错!字符串不可变# 正确做法是创建新字符串new_text = "J" + text[1:]  # Jython

转义字符和原始字符串

# 转义字符print("Hello\nWorld")  # 换行print("He said, \"Hi!\"")  # 包含引号print("C:\\Users\\Admin")  # 反斜杠# 原始字符串(r前缀)print(r"C:\Users\Admin")  # 不会转义print(r"Line1\nLine2")    # 输出 Line1\nLine2

2.3 bool(布尔类型):逻辑判断的核心

布尔值是程序决策的基础,只有True和False两个值:

# 布尔值的基本使用is_raining = Trueis_sunny = False# 布尔运算print(True and False)  # Falseprint(True or False)   # Trueprint(not True)        # False# 比较运算产生布尔值age = 20print(age >= 18)  # Trueprint(age == 20)  # Trueprint(age != 20)  # False# 在控制流中应用if is_raining:    print("带伞出门")else:    print("不用带伞")

Python的"真假"判断规则:Python中,所有值都可以在布尔上下文中使用

# 以下值在布尔上下文中被视为Falseprint(bool(False))    # Falseprint(bool(0))        # Falseprint(bool(0.0))      # Falseprint(bool(None))     # Falseprint(bool(""))       # Falseprint(bool([]))       # 空列表print(bool(()))       # 空元组print(bool({}))       # 空字典print(bool(set()))    # 空集合# 其他值都被视为Trueprint(bool(42))       # Trueprint(bool(-1))       # Trueprint(bool("Hello"))  # Trueprint(bool([123]))# Trueprint(bool({"key""value"}))  # True

实用技巧:利用布尔值简化代码

# 传统写法name = input("请输入姓名: ")if name != "":    print(f"你好,{name}!")else:    print("姓名不能为空!")# Pythonic写法if name:  # 自动转换为布尔值    print(f"你好,{name}!")else:    print("姓名不能为空!")# 列表不为空时处理items = [123]if items:  # 等价于 if len(items) > 0:    print(f"共有{len(items)}个物品")

2.4 List(列表):Python的万能容器

列表是Python中最灵活、最常用的数据类型,可以存储不同类型的数据:

# 创建列表numbers = [12345]          # 纯数字列表mixed = [1"Hello"3.14, True]   # 混合类型列表empty = []                         # 空列表nested = [[12], [34]]         # 嵌套列表# 列表操作fruits = ["apple""banana""cherry"]# 访问元素print(fruits[0])       # appleprint(fruits[-1])      # cherry(最后一个)print(fruits[1:3])     # ["banana", "cherry"](切片)# 修改元素fruits[0] = "orange"   # 列表可变,可修改元素fruits[1:3] = ["grape""mango"]  # 修改切片# 添加元素fruits.append("watermelon")  # 末尾添加fruits.insert(1"peach")    # 指定位置插入fruits.extend(["kiwi""pineapple"])  # 合并列表# 删除元素del fruits[0]           # 删除第一个fruits.pop()            # 删除最后一个fruits.remove("banana"# 删除指定值fruits.clear()          # 清空列表

列表推导式:Python的“语法糖”,让代码更简洁

# 传统写法:创建1-10的平方列表squares = []for i in range(111):    squares.append(i**2)# 列表推导式:一行搞定squares = [i**2 for i in range(1, 11)]# 带条件的推导式even_squares = [i**2 for i in range(1, 11) if i % 2 == 0]# 结果:[4, 16, 36, 64, 100]# 复杂推导式matrix = [[j for j in range(5)] for i in range(3)]# 创建3x5的二维列表

列表的实用方法

numbers = [528193]# 排序numbers.sort()               # 原地排序:[1, 2, 3, 5, 8, 9]sorted_numbers = sorted(numbers)  # 返回新列表# 反转numbers.reverse()            # 原地反转reversed_numbers = list(reversed(numbers))  # 返回新列表# 统计print(len(numbers))          # 长度print(min(numbers))          # 最小值print(max(numbers))          # 最大值print(sum(numbers))          # 求和print(numbers.count(2))      # 计数print(3 in numbers)          # 是否存在

2.5 Tuple(元组):不可变的“安全容器”

元组与列表相似,但创建后不可修改,这既是限制也是优势:

# 创建元组point = (1020)             # 坐标colors = ("red""green""blue")  # 颜色元组single = (42,)               # 单元素元组(必须有逗号)empty = ()                   # 空元组not_a_tuple = (42)           # 这不是元组,是整数42# 元组操作coordinates = (39.9116.4)  # 北京坐标print(coordinates[0])        # 39.9print(coordinates[1])        # 116.4print(coordinates[:1])       # (39.9,),切片返回元组# 尝试修改会报错# coordinates[0] = 40.0       # 报错!元组不可变# 但可以重新赋值coordinates = (40.0116.4)  # 这是创建新的元组# 元组拆包x, y = coordinatesprint(f"纬度: {x}, 经度: {y}")# 交换两个变量a, b = 1020a, b = b, a  # 交换,a=20, b=10

为什么需要元组?

  1. 安全性:保证数据不会被意外修改

  2. 哈希性:元组不可变,可以作为字典的键

  3. 性能:比列表更快的创建和访问速度

  4. 语义清晰:表示一组固定的、相关的值

# 返回多个值def get_user_info():    return "张三"25"北京"  # 返回元组name, age, city = get_user_info()  # 拆包接收# 作为字典的键location_key = (39.9116.4)  # 经纬度元组cities = {location_key: "北京"}print(cities[(39.9116.4)])  # 北京

2.6 Set(集合):去重与集合运算

集合是无序、不重复元素的集合,主要用来去重和数学集合运算:

# 创建集合fruits = {"apple""banana""cherry"}numbers = {12345}empty_set = set()  # 注意:{}创建的是空字典,不是空集合# 从列表去重names = ["Alice", "Bob", "Alice", "Charlie", "Bob"]unique_names = set(names)  # {'Alice', 'Bob', 'Charlie'}# 集合运算A = {12345}B = {45678}print(A | B)  # 并集:{12345678}print(A & B)  # 交集:{45}print(A - B)  # 差集(在A但不在B):{123}print(B - A)  # 差集(在B但不在A):{678}print(A ^ B)  # 对称差(不同时在A和B):{123678}# 集合操作fruits.add("orange")      # 添加元素fruits.remove("apple")    # 移除元素,不存在会报错fruits.discard("banana")  # 移除元素,不存在不报错fruits.pop()              # 随机移除一个元素

集合的应用场景

# 场景1:快速去重tags = ["python""java""python""c++""java"]unique_tags = set(tags)  # {"python", "java", "c++"}# 场景2:快速判断是否存在vip_users = {1001, 1002, 1003, 1004}user_id = 1002if user_id in vip_users:  # 集合的in操作是O(1),非常快    print("VIP用户")else:    print("普通用户")# 场景3:找共同好友alice_friends = {"Bob""Charlie""David"}bob_friends = {"Charlie""Eve""Frank"}common_friends = alice_friends & bob_friends  # {"Charlie"}

2.7 Dictionary(字典):键值对的魔法

字典是Python的“瑞士军刀”,通过键值对存储数据,查找速度极快:

# 创建字典student = {    "name""张三",    "age"20,    "major""计算机科学",    "grades": [859288]}# 访问元素print(student["name"])          # 张三print(student.get("age"))       # 20print(student.get("gender""未知"))  # 默认值:未知# 修改/添加元素student["age"] = 21             # 修改student["gender"] = "男"        # 添加student.update({"city""北京""score"95})  # 批量更新# 删除元素del student["grades"]           # 删除键age = student.pop("age")        # 删除并返回值student.clear()                 # 清空字典# 遍历字典for key in student:  # 遍历键    print(f"{key}{student[key]}")for key, value in student.items():  # 同时遍历键值    print(f"{key}{value}")for value in student.values():  # 遍历值    print(value)

字典推导式:快速创建字典

# 创建数字平方字典squares = {x: x**2 for x in range(1, 6)}# {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}# 转换列表为字典names = ["Alice""Bob""Charlie"]name_dict = {i: name for i, name in enumerate(names)}# {0: "Alice", 1: "Bob", 2: "Charlie"}# 筛选数据students = {    "Alice": 85,     "Bob": 92,     "Charlie": 78,     "David": 95}top_students = {name: score for name, score in students.items()                 if score >= 90}# {"Bob": 92, "David": 95}

字典的妙用

# 计数器text = "apple banana apple orange banana apple"words = text.split()word_count = {}for word in words:    word_count[word] = word_count.get(word, 0) + 1# {"apple"3"banana"2"orange"1}# 使用collections.Counter更简单from collections import Counterword_count = Counter(words)# 分组数据people = [    {"name""Alice""department""IT"},    {"name""Bob""department""HR"},    {"name""Charlie""department""IT"},    {"name""David""department""Sales"}]department_groups = {}for person in people:    dept = person["department"]    if dept not in department_groups:        department_groups[dept] = []    department_groups[dept].append(person["name"])# {"IT": ["Alice""Charlie"], "HR": ["Bob"], "Sales": ["David"]}

第三章:不可变 vs 可变——理解Python的内存哲学

这是Python数据类型设计中最重要的概念,直接影响到程序的性能和正确性。

3.1 不可变类型(数字、字符串、元组)

特点:一旦创建,内容就不能改变

# 字符串的不可变性text = "Python"# text[0] = "J"  # 报错!不能修改new_text = "J" + text[1:]  # 创建新字符串# 整数的不可变性a = 5print(id(a))  # 打印内存地址a = 6  # 不是修改a,而是让a指向新的整数6print(id(a))  # 内存地址变了!# 元组的不可变性point = (10, 20)# point[0] = 15  # 报错!不能修改new_point = (15, 20)  # 创建新元组

优势

  • 线程安全

  • 可作为字典的键

  • 可哈希,可用于集合元素

3.2 可变类型(列表、字典、集合)

特点:创建后内容可以修改

# 列表的可变性numbers = [1, 2, 3]print(id(numbers))  # 内存地址numbers.append(4)   # 修改列表print(id(numbers))  # 内存地址不变!# 字典的可变性person = {"name""Alice""age": 25}print(id(person))   # 内存地址person["city"] = "北京"  # 添加键值对print(id(person))   # 内存地址不变!

注意陷阱:可变对象作为函数参数

def add_item(items=[]):  # 默认参数是可变对象    items.append("new")    return itemsprint(add_item())  # ["new"]print(add_item())  # ["new", "new"] !意外结果print(add_item())  # ["new", "new", "new"]# 正确做法def add_item_correct(items=None):    if items is None:        items = []    items.append("new")    return items

第四章:数据类型转换——Python的自动与手动“翻译”

Python中数据类型转换分为两种:隐式(自动)和显式(手动)。

4.1 隐式类型转换:Python的“贴心小助手”

# 整数和浮点数运算x = 5      # inty = 3.14   # floatresult = x + y  # 5自动转为5.0,结果是floatprint(type(result))  # <class 'float'># 布尔值参与运算true_value = True    # 实际上是1false_value = False  # 实际上是0print(true_value + 5)   # 6print(false_value + 5)  # 5

但要注意:不是所有类型都能隐式转换

num = 123text = "456"# result = num + text  # 报错!不能隐式转换

4.2 显式类型转换:掌握“翻译”的主动权

# 字符串转数字str_num = "123"int_num = int(str_num)      # 123float_num = float("3.14")   # 3.14# 数字转字符串num = 456str_num = str(num)          # "456"# 列表、元组、集合间的转换numbers_list = [12321]numbers_tuple = tuple(numbers_list)  # (1, 2, 3, 2, 1)numbers_set = set(numbers_list)      # {1, 2, 3},去重了!# 字典转换items = [("name""Alice"), ("age"25)]person_dict = dict(items)  # {"name": "Alice", "age": 25}

转换函数全家福

# 基本类型转换int("123")          # 字符串→整数float("3.14")       # 字符串→浮点数str(123)            # 数字→字符串bool(0)             # 任何类型→布尔值# 集合类型转换list((123))     # 元组→列表tuple([123])    # 列表→元组set([1223])   # 列表→集合(去重)dict([("a"1), ("b"2)])  # 列表→字典# 进制转换bin(10)             # 十进制→二进制: '0b1010'oct(10)             # 十进制→八进制: '0o12'hex(10)             # 十进制→十六进制: '0xa'# 字符编码ord("A")            # 字符→ASCII码: 65chr(65)             # ASCII码→字符: 'A'

第五章:实战应用——数据类型组合应用

真正的编程中,数据类型很少单独使用,而是相互配合解决实际问题。

案例1:学生成绩管理系统

# 使用字典、列表、元组组合students = {    "001": {        "name""张三",        "scores": (859278),  # 元组:不可变,保护成绩        "courses": ["数学""英语""编程"]  # 列表:可变,可增减课程    },    "002": {        "name""李四",        "scores": (908895),        "courses": ["数学""物理""化学"]    }}# 添加学生def add_student(student_id, name):    students[student_id] = {        "name": name,        "scores": (),  # 空元组        "courses": []  # 空列表    }# 查询学生平均分def get_average_score(student_id):    if student_id in students:        scores = students[student_id]["scores"]        if scores:  # 元组不为空            return sum(scores) / len(scores)    return 0# 添加课程(去重)def add_course(student_id, course_name):    if student_id in students:        courses = students[student_id]["courses"]        if course_name not in courses:  # 列表转集合检查            courses.append(course_name)

案例2:数据分析中的类型应用

# 模拟电商订单数据orders = [    {"order_id"1001"amount"299.99"items": {"手机"1"耳机"2}},    {"order_id"1002"amount"599.99"items": {"笔记本"1}},    {"order_id"1003"amount"150.50"items": {"鼠标"3"键盘"1}}]# 1. 统计总销售额total_amount = sum(order["amount"for order in orders)  # floatprint(f"总销售额: ¥{total_amount:.2f}")# 2. 统计商品销量from collections import defaultdictproduct_sales = defaultdict(int)  # 默认值为0的字典for order in orders:    for product, quantity in order["items"].items():  # 字典遍历        product_sales[product] += quantity# 3. 找出最畅销商品top_product = max(product_sales.items(), key=lambda x: x[1])  # 元组比较print(f"最畅销商品: {top_product[0]},销量: {top_product[1]}")# 4. 按金额排序订单sorted_orders = sorted(orders, key=lambda x: x["amount"], reverse=True)print("订单金额排行:")for order in sorted_orders:    print(f"订单{order['order_id']}: ¥{order['amount']:.2f}")

第六章:2026年最佳实践与避坑指南

6.1 数据类型选择指南

  1. 存储一组数据,需要修改 → 列表list

  2. 存储一组数据,不需要修改 → 元组tuple

  3. 快速查找,通过键访问 → 字典dict

  4. 去重,集合运算 → 集合set

  5. 文本数据 → 字符串str

  6. 数字计算 → 整数int/浮点数float

  7. 逻辑判断 → 布尔值bool

6.2 常见陷阱与解决方法

陷阱1:可变默认参数

# 错误示例def add_to_list(value, my_list=[]):    my_list.append(value)    return my_listprint(add_to_list(1))  # [1]print(add_to_list(2))  # [1, 2] !意外# 正确示例def add_to_list_correct(value, my_list=None):    if my_list is None:        my_list = []    my_list.append(value)    return my_list

陷阱2:浅拷贝与深拷贝

# 浅拷贝问题original = [[1, 2], [3, 4]]shallow_copy = original.copy()  # 浅拷贝shallow_copy[0][0] = 99print(original)  # [[99, 2], [3, 4]] !被修改了# 深拷贝解决import copyoriginal = [[1, 2], [3, 4]]deep_copy = copy.deepcopy(original)deep_copy[0][0] = 99print(original)  # [[1, 2], [3, 4]] 安全

陷阱3:迭代时修改集合

# 错误示例numbers = {12345}for num in numbers:    if num % 2 == 0:        numbers.remove(num)  # 运行时错误!# 正确示例numbers = {12345}to_remove = set()for num in numbers:    if num % 2 == 0:        to_remove.add(num)numbers -= to_remove

6.3 性能优化技巧

  1. 列表 vs 元组:只读数据用元组,创建更快

  2. 列表推导式:比循环+append更快

  3. 集合去重:比手动检查快得多

  4. 字典查找:O(1)复杂度,比列表O(n)快

  5. 字符串连接:用join不要用+

# 字符串连接性能对比words = ["Python"] * 10000# 慢:O(n²)slow_result = ""for word in words:    slow_result += word# 快:O(n)fast_result = "".join(words)

掌握Python的数据类型,就像乐高玩家熟悉每一块积木。今天,我们从最简单的变量开始,探索了Python的六大核心数据类型,理解了可变与不可变的哲学,掌握了类型转换的技巧。

在2026年的今天,数据类型依然是Python编程的基石。无论是数据分析、人工智能、Web开发还是自动化脚本,都离不开这些基本构建块。

记住:

  • 列表是你灵活的笔记本

  • 字典是你高效的文件柜

  • 元组是你不变的承诺

  • 集合是你去重的筛子

  • 字符串是你表达的文字

  • 数字是你计算的工具

  • 布尔是你决策的指南针

当你熟练掌握这些"积木"后,就能搭建出任何你想象中的程序大厦。从今天开始,用正确的数据类型,写高效的Python代码。

数据类型是基础,但基础决定高度。 在编程的道路上,扎实的基础比炫酷的技巧更重要。从理解每个数据类型开始,一步一个脚印,你将成为真正的Python高手。


转发给正在学Python的朋友,一起进步!

推荐 + 点赞 + 收藏 + 关注

#Python基础 #数据类型 #Python教程 #编程入门 #Python学习 #2026Python #Python实战 #编程思维 #技术成长

--------End-- 


【免责声明】此文章旨在倡导社会正能量,无低俗等不良引导。本号对所有原创、转载文章陈述与观点均保持中立,内容仅供读者学习和交流。文章描述过程、图片如涉及版权或者人物侵权问题,请及时联系我们,我们将第一时间删除内容!如有事件存疑部分,联系后即刻删除或作出更改。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-21 16:58:18 HTTP/2.0 GET : https://f.mffb.com.cn/a/484261.html
  2. 运行时间 : 0.150775s [ 吞吐率:6.63req/s ] 内存消耗:4,986.98kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=d48ccdff2c50fa5705713ff97f5e5eb7
  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.000821s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000899s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000330s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000262s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000449s ]
  6. SELECT * FROM `set` [ RunTime:0.000203s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000566s ]
  8. SELECT * FROM `article` WHERE `id` = 484261 LIMIT 1 [ RunTime:0.000569s ]
  9. UPDATE `article` SET `lasttime` = 1776761898 WHERE `id` = 484261 [ RunTime:0.001322s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000213s ]
  11. SELECT * FROM `article` WHERE `id` < 484261 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000437s ]
  12. SELECT * FROM `article` WHERE `id` > 484261 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000374s ]
  13. SELECT * FROM `article` WHERE `id` < 484261 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000786s ]
  14. SELECT * FROM `article` WHERE `id` < 484261 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001181s ]
  15. SELECT * FROM `article` WHERE `id` < 484261 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002092s ]
0.152359s