当前位置:首页>python>Python快速入门学习笔记十五:函数进阶知识(上)

Python快速入门学习笔记十五:函数进阶知识(上)

  • 2026-06-29 15:26:16
Python快速入门学习笔记十五:函数进阶知识(上)

Python入门第十五课,主要是学习了函数的一些进阶知识,比如:多返回值、高阶函数、条件表达式、匿名函数,以及常用数据处理函数map、filter、sorted、reduce等。

  • 重新认识函数
  • 函数的多返回值
  • 参数的打包与解包
  • 高阶函数
  • 条件表达式
  • 匿名函数
  • 几个常用数据处理函数
    • map函数
    • filter函数
    • sorted函数
    • reduce函数

重新认识函数

1️⃣ 函数也是对象

# 函数也是对象
a1 = 100# a1是int类型的实例
a2 = 'hellp'# a2是str类的实例
a3 = [102030]   # a4是list类的实例

# welcome函数是function类的实例对象
defwelcome():
    print("你好,Python")

print(type(a1)) # <class 'int'>
print(type(a2)) # <class 'str'>
print(type(a3)) # <class 'list'>
print(type(welcome)) # <class 'function'>

上面代码中 welcome 函数的内存示意图:

2️⃣ 函数可以像对象一样,动态添加属性

defwelcome():
    print("你好,Python")

# 动态添加属性
welcome.desc = '这是一个用户打招呼的函数'
welcome.version = '1.0'
print(welcome.__dict__)

# 调用函数
welcome()

上述代码的内存结构示意图:

3️⃣ 函数可以赋值给变量

defwelcome():
    print("你好,Python")

# 把函数对象赋值给变量
say_hello = welcome

# 通过变量调用函数
say_hello()

# 通过函数名调用函数
welcome()

上述代码的结构示意图:

4️⃣ 可变参数 vs 不可变参数

不可变参数 代码示例:

defwelcome(data):
    print(f'函数收到的data是:{data},地址是:{id(data)}')
    data = 999
    print(f'被修改后的data是:{data},地址是:{id(data)}')

a = 666
print(f'函数外侧a的值是:{a},地址是:{id(a)}')
welcome(a)
print(f'函数调用后a的值是:{a},地址是:{id(a)}')

可变参数 代码示例:

defwelcome2(data):
    print(f'函数收到的data是:{data},地址是:{id(data)}')
    data[2] = 999
    print(f'被修改后的data是:{data},地址是:{id(data)}')

a = [102030]
print(f'函数外侧a的值是:{a},地址是:{id(a)}')
welcome2(a)
print(f'函数调用后a的值是:{a},地址是:{id(a)}')

5️⃣ 函数也可以作为参数

defwelcome():
    print("你好,Python")

defcaller(func):
    print('caller函数开始调用')
    func()

caller(welcome)

6️⃣ 函数也可以作为返回值

defwelcome():
    print('你好啊')
defshow_message():
        print('你好python')
return show_message


result = welcome()
result()

# 换种写法
welcome()()

函数的多返回值

在函数内的return关键字后面写多个值,并且多个值之间用逗号隔开,Python 会自动把多个值打包成元组。

defcalculate(x, y):
    res1 = x + y
    res2 = x - y
return res1, res2 # 实际返回的结果是:(res1, res2)

result = calculate(12)
print(result, type(result)) # (3, -1) <class 'tuple'>
r1, r2 = calculate(12# 直接解包
print(r1, r2) # 3 -1

参数的打包与解包

定义函数时,打包接收参数:

  • *形参名:打包所有的位置参数,形成一个元组。
  • **形参名:打包所有的关键字参数,形成一个字典。

调用函数时,解包传递参数:

  • *变量名:将元组拆解成一个一个独立的位置参数。
  • **变量名:将字典拆解成一个一个key=value形式的关键字参数。

示例代码:

defshow_info(*args, **kwargs):
    print(type(args), args) # <class 'tuple'> (10, 20, 30)
    print(type(kwargs), kwargs) # <class 'dict'> {'name': '张三', 'age': 41}


nums = (102030)
person = {'name''张三''age'41}
show_info(*nums, **person)

高阶函数

当一个函数的『参数是函数』或者『返回值是函数』,那么该函数就是高阶函数。

示例代码:

defwelcome():
    print("你好啊")

# 函数作为参数
defcaller(f):
    print('caller函数开始调用')
    f()

caller(welcome)

# 函数作为返回值
defouter():
    print('我是outer')
definner():
        print('inner')
return inner

outer()()

高阶函数意义:

❏ 代码复用性高:可以把行为“独立出去”,传入不同函数实现不同逻辑。

❏ 能让函数更灵活,更通用。

❏ 高阶函数是:装饰器、闭包的基础。(后续文章详解)

高阶函数的一个小应用:

definfo(msg):
return'【提示】' + msg
defwarn(msg):
return'【警告】' + msg
deferror(msg):
return'【错误】' + msg

deflog(func, text):
    print(func(text))

log(info, '文件保存成功!')
log(warn, '磁盘空间不足!')
log(error, '该用户不存在!')

条件表达式

❔什么是表达式:执行后最终能得到一个值的代码,就是表达式,示例如下:

3 + 5
'abc' * 3
5 > 3
'y'in'python'
len('hello')

条件表单式:根据不同的条件得到不同的值,又称:三元运算符 或 三目运算符。语法格式如下:

结果1if 条件 else 结果2

语义解释:如果条件为真,整个表达式的结果就是“结果1”,否则就是“结果2”。

示例代码:

age = 20

# if-else的写法
if age >= 18:
    text = '成年'
else:
    text = '未成年'
print(text)

# 条件表达式的写法
text = '成年'if age >= 18else'未成年'
print(text)

匿名函数

概念:所谓匿名函数,就是没有名字的函数,它无需使用def关键字去定义。

语法:Python 中使用lambda关键字来定义匿名函数,格式为:lamdba 参数: 表达式

使用场景:当一个函数只用一次,使用匿名函数会更简洁。

下面的示例代码展示同样的功能,分别使用普通函数与匿名函数实现:

  • 普通函数实现
defadd(a, b):
return a + b

defsub(a, b):
return a - b

defcalculate(func, a, b):
    print(f'计算结果为:{func(a, b)}')

calculate(add, 23)
calculate(sub, 23)
  • 匿名函数实现
defcalculate(func, a, b):
    print(f'计算结果为:{func(a, b)}')

# 使用匿名函数
calculate(lambda a, b: a + b, 12)
calculate(lambda a, b: a - b, 12)

特点:

  • 只能写一行,不能写多行代码。
  • 不能写代码块(if、for、while)。
  • 冒号右边必须是表达式,且只能写一个返回值。
  • 执行结果自动作为返回值。

示例代码(匿名函数 + 条件表达式):

is_adult = lambda age: '成年'if age >= 18else'未成年'
print(is_adult(18))
print(is_adult(13))

几个常用数据处理函数

map函数

map函数:对一组数据中的每一个元素,统一执行某种操作(加工),并生成一组新数据。

语法格式:map(操作函数, 可迭代对象)

注意点:

  • map函数返回的是一个迭代器对象,需要我们去手动遍历,或者手动转换类型。
  • 返回的是迭代器对象,且一旦遍历完成,就会被“耗尽”。
  • 延迟执行:map 不会立刻计算,只有在“需要结果”时才执行计算。
  • map 不会影响元素数量。

示例代码:

# 统一数据处理
nums1 = [10203040]
result = map(lambda x: x * 2, nums1)
print(type(result), result) # 返回迭代器对象 <class 'map'> <map object at 0x000001C58AFBB880>
print(list(result)) # [20, 40, 60, 80]
print(nums1) # [10, 20, 30, 40]

# 字符串格式化
names = ('python''java''ts')
result = map(lambda x: x.upper(), names)
print(type(result), result) # 返回迭代器对象 <class 'map'> <map object at 0x000001C58AFBB880>
print(tuple(result)) # ('PYTHON', 'JAVA', 'TS')
print(list(result)) # [] ??为什么为空呢?原因是迭代器对象上一行代码已经遍历过了,就会“耗尽”了
print(names) # ('python', 'java', 'ts')

# 类型转换
str_num = {'1''2''3''4'}
result = map(int, str_num)
print(type(result), result) # 返回迭代器对象 <class 'map'> <map object at 0x000001C58AFBB880>
print(set(result)) # {1, 2, 3, 4}
print(str_num) # {'1', '2', '3', '4'}

# 验证:map返回的迭代器对象,一旦遍历完成,就会被“耗尽”
num2 = [102030]
result = map(lambda x: x * 3, num2)
print(type(result), result)
print(list(result))
print(list(result))
print(list(result))
print(num2)

filter函数

filter函数:从一组数据中,筛选出符合条件的元素(过滤),并形成一组新数据。

语法格式:filter(操作函数, 可迭代对象)

注意点:

  • 延迟执行:filter 不会立刻筛选,只有在“需要结果”时才执行。
  • 返回迭代器对象,一旦遍历完成就会被“耗尽”。
  • 如果不传递过滤函数,那么会自动过滤掉“假值”。

示例代码:

# 筛选数值
nums = [1020304050]
result = filter(lambda n: n > 20, nums)
print(type(result), result)  # <class 'filter'> <filter object at 0x0000020D5A43BA00>
print(list(result))  # [30, 40, 50]
print(list(result))  # []
print(nums)  # [10, 20, 30, 40, 50]

# 筛选成年人
persons = [
    {'name''张三''age'15'gender''男'},
    {'name''李四''age'16'gender''女'},
    {'name''王五''age'21'gender''男'},
    {'name''李华''age'18'gender''女'},
    {'name''赵六''age'19'gender''女'},
    {'name''孙琪''age'20'gender''男'},
]
result = filter(lambda p: p['age'] > 19, persons)
print(type(result), result)  # <class 'filter'> <filter object at 0x000001C71B0DCA00>
print(list(result))  # [{'name': '王五', 'age': 21, 'gender': '男'}, {'name': '孙琪', 'age': 20, 'gender': '男'}]
print(list(result))  # []

# 过滤非法字符串
names = ['张三''''李四'None'王五']
result = filter(lambda n: n, names)
print(type(result), result)  # <class 'filter'> <filter object at 0x000001BDC7BACDC0>
print(list(result))  # ['张三', '李四', '王五']
print(list(result))  # []

# 如果不传递过滤函数,那么自动会过滤掉“假值”
data = [01'''hello', [], (), 5]
result = filter(None, data)
print(type(result), result) # <class 'filter'> <filter object at 0x00000187AB71D0F0>
print(list(result))  # [1, 'hello', 5]

sorted函数

sorted函数:对一组数据进行排序,返回一组新数据。注意该函数返回值是列表类型。

语法格式:sorted(可迭代对象, key=xxxx, reverse=xxxx)

# 数字排序
nums = tuple([40603050])
print(type(nums), nums)  # <class 'tuple'> (40, 60, 30, 50)
result = sorted(nums)
print(type(result), result)  # <class 'list'> [30, 40, 50, 60]
print(sorted(nums, reverse=True))  # [60, 50, 40, 30]

# 按照字符串长度排序
names = ['python''sql''java']
result = sorted(names, key=len, reverse=False)
print(type(result), result)  # <class 'list'> ['sql', 'java', 'python']

# 根据字典中的某个字段进行排序
persons = [
    {'name''张三''age'15'gender''男'},
    {'name''李四''age'16'gender''女'},
    {'name''王五''age'21'gender''男'},
    {'name''李华''age'18'gender''女'},
    {'name''赵六''age'19'gender''女'},
    {'name''孙琪''age'20'gender''男'},
]
result = sorted(persons, key=lambda p: p['age'], reverse=True)
print(type(result),
      result)  # <class 'list'> [{'name': '王五', 'age': 21, 'gender': '男'}, {'name': '孙琪', 'age': 20, 'gender': '男'}, {'name': '赵六', 'age': 19, 'gender': '女'}, {'name': '李华', 'age': 18, 'gender': '女'}, {'name': '李四', 'age': 16, 'gender': '女'}, {'name': '张三', 'age': 15, 'gender': '男'}]

拓展:我们之前学过的max函数,min函数,也可以传递key参数,用于设置筛选依据。

persons = [
    {'name''张三''age'15'gender''男'},
    {'name''李四''age'16'gender''女'},
    {'name''王五''age'21'gender''男'},
    {'name''李华''age'18'gender''女'},
    {'name''赵六''age'19'gender''女'},
    {'name''孙琪''age'20'gender''男'},
]

result = max(persons, key=lambda p: p['age'])
print(type(result), result) # <class 'dict'> {'name': '王五', 'age': 21, 'gender': '男'}
result = min(persons, key=lambda p: p['age'])
print(type(result), result) # <class 'dict'> {'name': '张三', 'age': 15, 'gender': '男'}

reduce函数

reduce函数:将一组数据不断“合并”,最终归并成一个结果。

语法格式:reduce(合并函数,可迭代对象, 初始值)

注意:reduce 函数需要从 functools 模块中引入才能使用。

# 从 functools 模块中引入 reduce
from functools import reduce

# 数值统计
nums = [12345]
result = reduce(lambda a, b: a + b, nums)
print(type(result), result)  # <class 'int'> 15
result = reduce(lambda a, b: a + b, nums, 100)
print(type(result), result)  # <class 'int'> 115

# 拼接字符串
str_list = ['ab''cd''ef']
result = reduce(lambda a, b: a + b, str_list)
print(type(result), result) # <class 'str'> abcdef
result = reduce(lambda a, b: a + b, str_list, '**')
print(type(result), result) # <class 'str'> **abcdef

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 12:33:34 HTTP/2.0 GET : https://f.mffb.com.cn/a/491544.html
  2. 运行时间 : 0.274284s [ 吞吐率:3.65req/s ] 内存消耗:4,665.59kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=80778e5859dd5c13c1025ddddf3feb6c
  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.000953s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001006s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.003897s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.005257s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000825s ]
  6. SELECT * FROM `set` [ RunTime:0.009925s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001013s ]
  8. SELECT * FROM `article` WHERE `id` = 491544 LIMIT 1 [ RunTime:0.011698s ]
  9. UPDATE `article` SET `lasttime` = 1783053214 WHERE `id` = 491544 [ RunTime:0.012752s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000446s ]
  11. SELECT * FROM `article` WHERE `id` < 491544 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000802s ]
  12. SELECT * FROM `article` WHERE `id` > 491544 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000459s ]
  13. SELECT * FROM `article` WHERE `id` < 491544 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.006848s ]
  14. SELECT * FROM `article` WHERE `id` < 491544 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.015565s ]
  15. SELECT * FROM `article` WHERE `id` < 491544 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.012431s ]
0.278582s