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

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

  • 2026-01-14 19:06:21
Python 内置函数系列:c开头系列函数

callable():判断对象是否"可调用"

1. 基本用法

callable()函数就像是一个"能力检测器",它可以判断一个对象是否可以被调用(即是否可以使用括号()来执行)。

# 检测不同类型对象的可调用性
def
 normal_function():
    return
 "我是一个函数"

class
 MyClass:
    def
 __init__(self):
        self
.name = "示例类"

# 测试各种对象

print
(callable(normal_function))  # True - 函数是可调用的
print
(callable(MyClass))         # True - 类是可调用的(调用类会创建实例)
print
(callable(MyClass()))        # False - 默认实例不可调用

# 添加__call__方法后,让实例可调用

class
 CallableClass:
    def
 __call__(self):
        return
 "现在我可以被调用了!"

callable_instance = CallableClass()
print
(callable(callable_instance))  # True
print
(callable_instance())          # "现在我可以被调用了!"

2. 实际应用场景

# 动态调用验证
def
 safe_call(func, *args, **kwargs):
    """安全调用函数,避免AttributeError"""

    if
 callable(func):
        return
 func(*args, **kwargs)
    else
:
        raise
 TypeError(f"对象 {func} 不可调用")

# 插件系统中的应用

class
 PluginSystem:
    def
 __init__(self):
        self
.plugins = []

    def
 register_plugin(self, plugin):
        """注册插件,确保插件有call方法"""

        if
 callable(plugin):
            self
.plugins.append(plugin)
        else
:
            print
(f"警告: {plugin} 不是可调用对象,无法注册")

    def
 run_all(self):
        """运行所有插件"""

        for
 plugin in self.plugins:
            if
 callable(plugin):
                plugin()

# 使用示例

def
 simple_plugin():
    print
("简单插件执行")

system = PluginSystem()
system.register_plugin(simple_plugin)  # 成功注册
system.register_plugin("不是函数")      # 会发出警告

chr():数字到字符的"翻译官"

1. 基础字符转换

chr()函数将Unicode码点转换为对应的字符,是ord()函数的逆操作。

# 基本ASCII字符
print
(chr(65))    # 'A' - 大写A
print
(chr(97))    # 'a' - 小写a
print
(chr(48))    # '0' - 数字0

# 特殊符号和表情

print
(chr(169))   # '©' - 版权符号
print
(chr(8364))  # '€' - 欧元符号
print
(chr(128512)) # '😀' - 笑脸表情

# 实用范围示例

for
 code in range(65, 91):  # A-Z
    print
(chr(code), end=' ')
# 输出: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

2. 实际应用:密码生成器

import random

def
 generate_password(length=8, use_special_chars=True):
    """生成随机密码"""

    password = []

    # 数字范围

    numbers = [chr(i) for i in range(48, 58)]  # 0-9

    # 小写字母

    lower_case = [chr(i) for i in range(97, 123)]  # a-z

    # 大写字母  

    upper_case = [chr(i) for i in range(65, 91)]  # A-Z

    # 特殊字符

    special_chars = [chr(33), chr(35), chr(36), chr(37), chr(38)]  # ! # $ % &

    # 组合所有字符

    all_chars = numbers + lower_case + upper_case
    if
 use_special_chars:
        all_chars.extend(special_chars)

    # 生成密码

    for
 _ in range(length):
        password.append(random.choice(all_chars))

    return
 ''.join(password)

# 生成密码示例

print
(f"简单密码: {generate_password(6, use_special_chars=False)}")
print
(f"复杂密码: {generate_password(12, use_special_chars=True)}")

@classmethod:面向类的"团队协作"

1. 基本概念和使用

类方法将方法绑定到类而不是实例,第一个参数是类本身(通常命名为cls)。

class Date:
    def
 __init__(self, year, month, day):
        self
.year = year
        self
.month = month
        self
.day = day

    @classmethod

    def
 from_string(cls, date_string):
        """从字符串创建Date实例"""

        year, month, day = map(int, date_string.split('-'))
        return
 cls(year, month, day)  # 相当于调用Date(year, month, day)

    @classmethod

    def
 from_timestamp(cls, timestamp):
        """从时间戳创建Date实例(模拟)"""

        # 简化实现,实际中会使用datetime库

        return
 cls(2024, 1, 1)  # 返回固定日期

    def
 __str__(self):
        return
 f"{self.year}-{self.month:02d}-{self.day:02d}"

# 使用不同的构造方法

date1 = Date(2024, 1, 15)  # 传统构造
date2 = Date.from_string("2024-01-20")  # 类方法构造
date3 = Date.from_timestamp(1642204800)  # 另一个类方法

print
(f"日期1: {date1}")
print
(f"日期2: {date2}")
print
(f"日期3: {date3}")

2. 实际应用:工厂模式

class Animal:
    def
 __init__(self, name, sound):
        self
.name = name
        self
.sound = sound

    @classmethod

    def
 create_dog(cls):
        """创建狗实例的工厂方法"""

        return
 cls("狗", "汪汪")

    @classmethod

    def
 create_cat(cls):
        """创建猫实例的工厂方法"""

        return
 cls("猫", "喵喵")

    @classmethod

    def
 create_animal(cls, animal_type):
        """通用动物工厂"""

        animals = {
            'dog'
: ("狗", "汪汪"),
            'cat'
: ("猫", "喵喵"),
            'duck'
: ("鸭子", "嘎嘎")
        }
        if
 animal_type in animals:
            name, sound = animals[animal_type]
            return
 cls(name, sound)
        else
:
            raise
 ValueError(f"不支持的动物类型: {animal_type}")

    def
 speak(self):
        return
 f"{self.name}说: {self.sound}"

# 使用工厂方法创建对象

dog = Animal.create_dog()
cat = Animal.create_cat()
duck = Animal.create_animal('duck')

print
(dog.speak())  # 狗说: 汪汪
print
(cat.speak())  # 猫说: 喵喵
print
(duck.speak()) # 鸭子说: 嘎嘎

compile():代码的"编译器"

1. 基础编译功能

compile()函数将源代码字符串编译为可执行的代码对象或AST对象。

# 编译简单表达式
code_str = "x + y * 2"
compiled_code = compile(code_str, '<string>', 'eval')

# 执行编译后的代码

x, y = 5, 3
result = eval(compiled_code)
print
(f"表达式结果: {result}")  # 5 + 3 * 2 = 11

# 编译多行代码(语句序列)

multi_line_code = """
for i in range(3):
    print(f"数字: {i}")
"""

compiled_exec = compile(multi_line_code, '<string>', 'exec')
exec
(compiled_exec)

2. 实际应用:简单公式计算器

def safe_calculator(expression, variables=None):
    """安全的公式计算器"""

    if
 variables is None:
        variables = {}

    try
:
        # 编译表达式为eval模式

        compiled = compile(expression, '<calculator>', 'eval')

        # 安全地执行(限制可用变量)

        allowed_vars = {'__builtins__': None}  # 限制内置函数
        allowed_vars.update(variables)

        result = eval(compiled, allowed_vars)
        return
 result
    except
 SyntaxError as e:
        return
 f"公式语法错误: {e}"
    except
 Exception as e:
        return
 f"计算错误: {e}"

# 使用示例

variables = {'a': 10, 'b': 5, 'c': 2}

expressions = [
    "a + b * c"
,        # 正常计算
    "(a + b) * c"
,      # 带括号
    "max(a, b, c)"
,     # 会报错(max被限制)
    "invalid syntax"
    # 语法错误
]

for
 expr in expressions:
    result = safe_calculator(expr, variables)
    print
(f"{expr} = {result}")

complex():复数的"创造者"

1. 多种创建方式

complex()函数提供了多种创建复数的方式,非常灵活。

# 方式1:从字符串创建
c1 = complex("3+4j")
print
(f"从字符串: {c1}")  # (3+4j)

# 方式2:分别指定实部和虚部

c2 = complex(3, 4)
print
(f"分别指定: {c2}")  # (3+4j)

# 方式3:只指定实部或虚部

c3 = complex(5)        # 实部为5,虚部为0
c4 = complex(imag=7)  # 实部为0,虚部为7
print
(f"只有实部: {c3}")  # (5+0j)
print
(f"只有虚部: {c4}")  # 7j

# 方式4:从其他数字类型转换

c5 = complex(3.14)    # 浮点数转复数
print
(f"浮点转换: {c5}")  # (3.14+0j)

2. 实际应用:复数运算工具

class ComplexCalculator:
    """复数计算工具类"""


    @staticmethod

    def
 parse_complex(input_str):
        """解析复数字符串"""

        try
:
            return
 complex(input_str.replace(' ', ''))  # 去除空格
        except
 ValueError:
            raise
 ValueError(f"无法解析复数: {input_str}")

    @staticmethod

    def
 add(c1, c2):
        """复数加法"""

        return
 complex(c1.real + c2.real, c1.imag + c2.imag)

    @staticmethod

    def
 multiply(c1, c2):
        """复数乘法:(a+bi)(c+di) = (ac-bd) + (ad+bc)i"""

        real_part = c1.real * c2.real - c1.imag * c2.imag
        imag_part = c1.real * c2.imag + c1.imag * c2.real
        return
 complex(real_part, imag_part)

    @staticmethod

    def
 to_polar(complex_num):
        """转换为极坐标形式"""

        import
 math
        r = math.sqrt(complex_num.real**2 + complex_num.imag**2)
        theta = math.atan2(complex_num.imag, complex_num.real)
        return
 r, math.degrees(theta)

# 使用示例

calc = ComplexCalculator()

# 解析和计算

num1 = calc.parse_complex("3+4j")
num2 = calc.parse_complex("1-2j")

print
(f"加法结果: {calc.add(num1, num2)}")           # (4+2j)
print
(f"乘法结果: {calc.multiply(num1, num2)}")     # (11-2j)

# 极坐标表示

magnitude, angle = calc.to_polar(num1)
print
(f"极坐标: 模长={magnitude:.2f}, 角度={angle:.1f}°")

总结

通过今天的探索,我们发现这些"熟悉又陌生"的内置函数其实蕴含着强大的功能:

  1. 1. callable() - 动态调用的安全卫士
  2. 2. chr() - 字符编码的翻译官
  3. 3. @classmethod - 面向类的团队协作工具
  4. 4. compile() - 代码的动态编译器
  5. 5. complex() - 复数运算的基石

阅读推荐

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

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


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

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-09 05:19:45 HTTP/2.0 GET : https://f.mffb.com.cn/a/462308.html
  2. 运行时间 : 0.222787s [ 吞吐率:4.49req/s ] 内存消耗:4,845.90kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=e798175bd489629b4b8bd9c5c16c670c
  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.000904s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001437s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000627s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001075s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001218s ]
  6. SELECT * FROM `set` [ RunTime:0.000564s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001299s ]
  8. SELECT * FROM `article` WHERE `id` = 462308 LIMIT 1 [ RunTime:0.001156s ]
  9. UPDATE `article` SET `lasttime` = 1770585586 WHERE `id` = 462308 [ RunTime:0.008891s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.005968s ]
  11. SELECT * FROM `article` WHERE `id` < 462308 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001404s ]
  12. SELECT * FROM `article` WHERE `id` > 462308 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002197s ]
  13. SELECT * FROM `article` WHERE `id` < 462308 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.027003s ]
  14. SELECT * FROM `article` WHERE `id` < 462308 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.015758s ]
  15. SELECT * FROM `article` WHERE `id` < 462308 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.005957s ]
0.224525s