当前位置:首页>python>Python 内置函数系列:f开头系列函数

Python 内置函数系列:f开头系列函数

  • 2026-01-25 12:41:15
Python 内置函数系列:f开头系列函数

filter():数据过滤的"智能筛子"

1. 基础用法:基于条件过滤元素

filter()函数使用指定函数来过滤可迭代对象中的元素,只保留函数返回真值的元素。

# 基础过滤示例
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

# 过滤偶数

even_numbers = list(filter(lambda x: x % 2 == 0, numbers))
print
(f"偶数: {even_numbers}")  # 输出: [2, 4, 6, 8, 10]

# 过滤None值

mixed_data = [0, 1, False, True, None, "hello", "", 3.14]
truthy_values = list(filter(None, mixed_data))
print
(f"真值元素: {truthy_values}")  # 输出: [1, True, 'hello', 3.14]

# 等价生成器表达式

# filter(function, iterable) 相当于:

# (item for item in iterable if function(item))  # 当function不是None时

# (item for item in iterable if item)           # 当function是None时

2. 实际应用:数据清洗和验证

class DataCleaner:
    @staticmethod

    def
 remove_outliers(data, threshold_func):
        """移除异常值"""

        return
 list(filter(threshold_func, data))

    @staticmethod

    def
 validate_emails(email_list):
        """验证邮箱格式(简单版本)"""

        def
 is_valid_email(email):
            return
 isinstance(email, str) and '@' in email and '.' in email.split('@')[-1]

        return
 list(filter(is_valid_email, email_list))

    @staticmethod

    def
 filter_by_type(data, target_type):
        """按类型过滤数据"""

        return
 list(filter(lambda x: isinstance(x, target_type), data))

# 使用示例

cleaner = DataCleaner()

# 移除数值异常值

numbers = [10, 15, 100, 12, 8, 200, 14]
normal_numbers = cleaner.remove_outliers(numbers, lambda x: x < 50)
print
(f"正常数值: {normal_numbers}")

# 邮箱验证

emails = ["user@example.com", "invalid", "test@domain", "admin@site.org"]
valid_emails = cleaner.validate_emails(emails)
print
(f"有效邮箱: {valid_emails}")

# 类型过滤

mixed_data = [1, "hello", 3.14, [1, 2], "world", 42]
strings_only = cleaner.filter_by_type(mixed_data, str)
print
(f"仅字符串: {strings_only}")

float():数值转换的"精确天平"

1. 基础用法:创建浮点数

float()函数从数字或字符串创建浮点数,支持多种输入格式。

# 从数字创建
print
(f"从整数创建: {float(42)}")        # 输出: 42.0
print
(f"从浮点数创建: {float(3.14)}")    # 输出: 3.14

# 从字符串创建

print
(f"带符号字符串: {float('+1.23')}")    # 输出: 1.23
print
(f"带空格字符串: {float('   -12345\\n')}")  # 输出: -12345.0
print
(f"科学计数法: {float('1e-003')}")     # 输出: 0.001
print
(f"大写科学计数法: {float('+1E6')}")   # 输出: 1000000.0
print
(f"无穷大: {float('-Infinity')}")     # 输出: -inf

# 特殊值

print
(f"NaN: {float('nan')}")            # 输出: nan
print
(f"无穷大: {float('inf')}")         # 输出: inf

# 无参数调用

print
(f"无参数: {float()}")              # 输出: 0.0

2. 实际应用:安全数值转换和数据处理

class SafeFloatConverter:
    @staticmethod

    def
 safe_float_conversion(value, default=0.0):
        """安全转换为浮点数"""

        try
:
            return
 float(value)
        except
 (ValueError, TypeError):
            return
 default

    @staticmethod

    def
 parse_numeric_strings(string_list):
        """从字符串列表中解析数值"""

        def
 try_convert(s):
            try
:
                return
 float(s)
            except
 (ValueError, TypeError):
                return
 None

        converted = filter(lambda x: x is not None, map(try_convert, string_list))
        return
 list(converted)

    @staticmethod

    def
 validate_float_range(value, min_val=None, max_val=None):
        """验证浮点数范围"""

        try
:
            num = float(value)
            if
 min_val is not None and num < min_val:
                return
 False
            if
 max_val is not None and num > max_val:
                return
 False
            return
 True
        except
 (ValueError, TypeError):
            return
 False

# 使用示例

converter = SafeFloatConverter()

# 安全转换

test_values = ["3.14", "invalid", "99.9", None, "1e2"]
safe_results = [converter.safe_float_conversion(v) for v in test_values]
print
(f"安全转换结果: {safe_results}")

# 数值字符串解析

numeric_strings = ["123", "45.67", "1e-3", "not_a_number", "-999"]
parsed_numbers = converter.parse_numeric_strings(numeric_strings)
print
(f"解析后的数值: {parsed_numbers}")

# 范围验证

values_to_check = [10, "25.5", "1000", "-5", "invalid"]
for
 val in values_to_check:
    is_valid = converter.validate_float_range(val, min_val=0, max_val=100)
    print
(f"{val} 在0-100范围内: {is_valid}")

format():字符串格式化的"魔术师"

1. 基础用法:值格式化

format()函数将值转换为格式化字符串,支持丰富的格式化选项。

# 基本格式化
print
(f"整数格式化: {format(12345, ',')}")        # 输出: 12,345
print
(f"浮点数格式化: {format(3.14159, '.2f')}")  # 输出: 3.14
print
(f"百分比格式化: {format(0.256, '.1%')}")    # 输出: 25.6%

# 对齐和填充

print
(f"右对齐: {format('hello', '>10')}")        # 输出: '     hello'
print
(f"左对齐: {format('world', '<10')}")        # 输出: 'world     '
print
(f"居中对齐: {format('test', '^10')}")       # 输出: '   test   '
print
(f"零填充: {format(42, '05d')}")             # 输出: 00042

# 数字格式化

print
(f"十六进制: {format(255, 'x')}")            # 输出: ff
print
(f"八进制: {format(64, 'o')}")               # 输出: 100
print
(f"二进制: {format(10, 'b')}")               # 输出: 1010

# 与str()的比较

value = 3.1415926
print
(f"str()版本: {str(value)}")                 # 输出: 3.1415926
print
(f"format()版本: {format(value, '.3f')}")    # 输出: 3.142

2. 实际应用:自定义格式化和报表生成

class ReportFormatter:
    @staticmethod

    def
 format_currency(amount, currency_symbol='¥'):
        """格式化货币金额"""

        return
 format(amount, f'{currency_symbol},.2f')

    @staticmethod

    def
 format_percentage_data(values):
        """格式化百分比数据"""

        return
 [format(val, '.2%') for val in values]

    @staticmethod

    def
 create_aligned_table(data, column_widths):
        """创建对齐的表格数据"""

        formatted_rows = []
        for
 row in data:
            formatted_cells = []
            for
 i, cell in enumerate(row):
                width = column_widths[i]
                # 根据内容类型选择格式化方式

                if
 isinstance(cell, (int, float)):
                    formatted = format(cell, f'>{width}')
                else
:
                    formatted = format(str(cell), f'<{width}')
                formatted_cells.append(formatted)
            formatted_rows.append(' '.join(formatted_cells))
        return
 formatted_rows

    @staticmethod

    def
 format_scientific_data(numbers, precision=3):
        """格式化科学数据"""

        return
 [format(num, f'.{precision}e') for num in numbers]

# 使用示例

formatter = ReportFormatter()

# 货币格式化

amounts = [1234.56, 7890.12, 45.67, 1000000]
currency_formatted = [formatter.format_currency(amt) for amt in amounts]
print
(f"货币格式化: {currency_formatted}")

# 百分比数据

percentages = [0.1234, 0.5678, 0.9876]
percent_formatted = formatter.format_percentage_data(percentages)
print
(f"百分比格式化: {percent_formatted}")

# 表格对齐

table_data = [
    ["产品", "销量", "增长率"],
    ["手机", 1500, 0.25],
    ["电脑", 800, 0.15],
    ["平板", 1200, 0.30]
]
aligned_table = formatter.create_aligned_table(table_data, [10, 8, 10])
print
("对齐表格:")
for
 row in aligned_table:
    print
(row)

# 科学数据

scientific_data = [1234567, 0.000123, 987654321]
sci_formatted = formatter.format_scientific_data(scientific_data)
print
(f"科学计数法: {sci_formatted}")

frozenset():不可变集合的"保险箱"

1. 基础用法:创建不可变集合

frozenset()函数创建不可变的集合对象,适合作为字典键或集合元素。

# 从可迭代对象创建
fset1 = frozenset([1, 2, 3, 4, 5])
print
(f"从列表创建: {fset1}")  # 输出: frozenset({1, 2, 3, 4, 5})

# 从字符串创建

fset2 = frozenset("hello")
print
(f"从字符串创建: {fset2}")  # 输出: frozenset({'h', 'e', 'l', 'o'})

# 从范围创建

fset3 = frozenset(range(5))
print
(f"从范围创建: {fset3}")  # 输出: frozenset({0, 1, 2, 3, 4})

# 空集合

empty_fset = frozenset()
print
(f"空集合: {empty_fset}")  # 输出: frozenset()

# 作为字典键

dict_with_frozenset = {
    frozenset
([1, 2, 3]): "集合1",
    frozenset
([4, 5, 6]): "集合2"
}
print
(f"字典键示例: {dict_with_frozenset}")

2. 实际应用:数据去重和集合运算

class SetOperations:
    @staticmethod

    def
 create_immutable_lookup_table(data_list):
        """创建不可变查找表"""

        unique_items = frozenset(data_list)
        return
 {item: index for index, item in enumerate(unique_items)}

    @staticmethod

    def
 find_common_elements(*sequences):
        """查找多个序列的共同元素"""

        if
 not sequences:
            return
 frozenset()

        # 将所有序列转换为frozenset并求交集

        sets = [frozenset(seq) for seq in sequences]
        common = sets[0]
        for
 s in sets[1:]:
            common = common.intersection(s)
        return
 common

    @staticmethod

    def
 create_immutable_config(config_dict):
        """创建不可变配置"""

        frozen_config = {}
        for
 key, value in config_dict.items():
            if
 isinstance(value, (list, set)):
                frozen_config[key] = frozenset(value)
            else
:
                frozen_config[key] = value
        return
 frozen_config

    @staticmethod

    def
 set_operations_example():
        """集合运算示例"""

        A = frozenset([1, 2, 3, 4, 5])
        B = frozenset([4, 5, 6, 7, 8])

        print
(f"集合A: {A}")
        print
(f"集合B: {B}")
        print
(f"并集: {A.union(B)}")
        print
(f"交集: {A.intersection(B)}")
        print
(f"差集(A-B): {A.difference(B)}")
        print
(f"对称差集: {A.symmetric_difference(B)}")

# 使用示例

operations = SetOperations()

# 创建查找表

data = ["apple", "banana", "apple", "cherry", "banana"]
lookup_table = operations.create_immutable_lookup_table(data)
print
(f"查找表: {lookup_table}")

# 查找共同元素

list1 = [1, 2, 3, 4, 5]
list2 = [3, 4, 5, 6, 7]
list3 = [5, 6, 7, 8, 9]
common = operations.find_common_elements(list1, list2, list3)
print
(f"共同元素: {common}")

# 不可变配置

config = {
    "allowed_users"
: ["user1", "user2", "user3"],
    "permissions"
: {"read", "write"},
    "max_connections"
: 100
}
frozen_config = operations.create_immutable_config(config)
print
(f"不可变配置: {frozen_config}")

# 集合运算演示

operations.set_operations_example()

版本变更与兼容性说明

1. 各函数的版本演进

filter()函数

  • • 始终是Python的核心内置函数
  • • 在Python 3中返回迭代器(Python 2中返回列表)

float()函数的版本变更

# 3.6版本:支持数字分组下划线
print
(f"分组数字: {float('1_000_000.5')}")  # 输出: 1000000.5

# 3.7版本:参数变为仅限位置形参

# float(number=0.0) -> 现在必须使用位置参数


# 3.8版本:__float__()未定义时回退至__index__()

class
 CustomNumber:
    def
 __index__(self):
        return
 42

custom_num = CustomNumber()
print
(f"回退转换: {float(custom_num)}")  # 输出: 42.0

format()函数的版本变更

# 3.4版本:当format_spec不是空字符串时,object().__format__(format_spec)会触发TypeError
try
:
    result = object().__format__('s')
    print
(f"对象格式化: {result}")
except
 TypeError as e:
    print
(f"格式化错误: {e}")

frozenset()函数

  • • 从Python 2.4开始引入
  • • 始终保持稳定的API

总结

通过本文的详细解析,我们深入了解了四个重要的Python内置函数:

  1. 1. filter() - 数据过滤的智能筛子
  2. 2. float() - 数值转换的精确天平
  3. 3. format() - 字符串格式化的魔术师
  4. 4. frozenset() - 不可变集合的保险箱

关键知识点总结:

  • • filter(func, iterable)惰性过滤元素,支持None函数
  • • float(x)从数字或字符串创建浮点数,支持科学计数法
  • • format(value, spec)灵活格式化值,支持对齐、精度等选项
  • • frozenset(iterable)创建不可变集合,适合作为字典键

版本兼容性提醒:

  • • 注意float()在3.7+版本中变为仅限位置参数
  • • format()在3.4+版本中对空对象有更严格的错误处理
  • • 使用数字分组下划线需要Python 3.6+

阅读推荐

Python 内置函数系列:e开头系列函数

Python 内置函数系列:d开头系列函数

Python 内置函数系列:c开头系列函数


关注我,获取更多Python学习资源、实战项目和行业动态!在公众号后台回复"python学习",获取Python学习电子书籍!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 19:33:24 HTTP/2.0 GET : https://f.mffb.com.cn/a/463340.html
  2. 运行时间 : 0.205350s [ 吞吐率:4.87req/s ] 内存消耗:4,458.77kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=10e9ccdcb687a9daad452e11c5c3532e
  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.000961s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001430s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.003304s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000689s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001420s ]
  6. SELECT * FROM `set` [ RunTime:0.000613s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001468s ]
  8. SELECT * FROM `article` WHERE `id` = 463340 LIMIT 1 [ RunTime:0.001088s ]
  9. UPDATE `article` SET `lasttime` = 1770550404 WHERE `id` = 463340 [ RunTime:0.013920s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000304s ]
  11. SELECT * FROM `article` WHERE `id` < 463340 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000577s ]
  12. SELECT * FROM `article` WHERE `id` > 463340 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000341s ]
  13. SELECT * FROM `article` WHERE `id` < 463340 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001081s ]
  14. SELECT * FROM `article` WHERE `id` < 463340 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.003704s ]
  15. SELECT * FROM `article` WHERE `id` < 463340 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001000s ]
0.206987s