当前位置:首页>python>【一起学Python】第11天:数字类型Number详细使用总结

【一起学Python】第11天:数字类型Number详细使用总结

  • 2026-02-07 09:38:59
【一起学Python】第11天:数字类型Number详细使用总结

Python 数字数据类型用于存储数值。

数据类型是不允许改变的,这就意味着如果改变数字数据类型的值,将重新分配内存空间。

一、数字类型概述

Python支持四种数字类型:
# 1. 整数 (int) - 无限精度integer = 42big_integer = 123456789012345678901234567890negative = -100# 2. 浮点数 (float) - 双精度float_num = 3.14scientific = 1.5e-4  # 0.00015negative_float = -2.5# 3. 复数 (complex)complex_num = 3 + 4jpure_imaginary = 5j# 4. 布尔 (bool) - 是int的子类boolean = True  # 等于 1boolean2 = False  # 等于 0

二、整数(int)

1. 整数的创建

# 十进制decimal = 100# 二进制(0b前缀)binary = 0b1010  # 10print(binary)  # 10# 八进制(0o前缀)octal = 0o12  # 10print(octal)  # 10# 十六进制(0x前缀)hexadecimal = 0xFF  # 255print(hexadecimal)  # 255# 使用下划线分隔(提高可读性,Python 3.6+)large_num = 1_000_000print(large_num)  # 1000000billion = 1_000_000_000print(billion)  # 1000000000# 从字符串转换num1 = int('100')  # 10进制num2 = int('1010'2)  # 2进制num3 = int('FF'16)  # 16进制print(num1, num2, num3)  # 100 10 255# 从浮点数转换(截断小数部分)num4 = int(3.9)print(num4)  # 3num5 = int(-3.9)print(num5)  # -3

2. 整数的运算

a, b = 103# 基本运算print(a + b)   # 13  加法print(a - b)   # 7   减法print(a * b)   # 30  乘法print(a / b)   # 3.333... 除法(返回浮点数)print(a // b)  # 3   整除(向下取整)print(a % b)   # 1   取余print(a ** b)  # 1000 幂运算# 负数的整除和取余print(-10 // 3)  # -4 (向下取整)print(-10 % 3)   # 2print(10 // -3)  # -4print(10 % -3)   # -2# 绝对值print(abs(-10))  # 10# divmod() - 同时获取商和余数quotient, remainder = divmod(103)print(quotient, remainder)  # 3 1# pow() - 幂运算(支持三参数取模)print(pow(210))      # 1024print(pow(210100)) # 24 (2^10 % 100)

3. 位运算

a, b = 6013  # 60 = 0011 110013 = 0000 1101# 按位与print(a & b)   # 12 (0000 1100)# 按位或print(a | b)   # 61 (0011 1101)# 按位异或print(a ^ b)   # 49 (0011 0001)# 按位取反print(~a)      # -61# 左移print(a << 2)  # 240 (1111 0000)# 右移print(a >> 2)  # 15 (0000 1111)# 实际应用:权限管理READ = 0b001    # 1WRITE = 0b010   # 2EXECUTE = 0b100 # 4# 授予读写权限permission = READ | WRITEprint(permission)  # 3# 检查是否有写权限has_write = bool(permission & WRITE)print(has_write)  # True# 撤销写权限permission = permission & ~WRITEprint(permission)  # 1

4. 整数的方法和属性

# bit_length() - 二进制位数num = 10  # 1010print(num.bit_length())  # 4num = 255  # 11111111print(num.bit_length())  # 8# to_bytes() - 转换为字节num = 1024bytes_data = num.to_bytes(2, byteorder='big')print(bytes_data)  # b'\x04\x00'# from_bytes() - 从字节创建num = int.from_bytes(b'\x04\x00', byteorder='big')print(num)  # 1024# as_integer_ratio() - 返回分数形式(对整数返回 n/1)num = 10print(num.as_integer_ratio())  # (10, 1)

三、浮点数(float)

1. 浮点数的创建

# 普通表示f1 = 3.14f2 = -2.5f3 = 0.5# 科学计数法f4 = 1.5e2   # 150.0f5 = 1.5e-2  # 0.015f6 = -3e3    # -3000.0# 特殊值infinity = float('inf')      # 正无穷neg_infinity = float('-inf') # 负无穷not_a_number = float('nan')  # 非数字print(infinity)      # infprint(neg_infinity)  # -infprint(not_a_number)  # nan# 从字符串转换f7 = float('3.14')f8 = float('1.5e2')print(f7, f8)  # 3.14 150.0# 从整数转换f9 = float(10)print(f9)  # 10.0

2. 浮点数的运算

a, b = 3.52.0# 基本运算print(a + b)   # 5.5print(a - b)   # 1.5print(a * b)   # 7.0print(a / b)   # 1.75print(a // b)  # 1.0 (浮点整除)print(a % b)   # 1.5print(a ** b)  # 12.25# 四舍五入print(round(3.14159))      # 3print(round(3.141592))   # 3.14print(round(3.141594))   # 3.1416# ⚠️ 银行家舍入(round half to even)print(round(0.5))   # 0 (偶数)print(round(1.5))   # 2 (偶数)print(round(2.5))   # 2 (偶数)print(round(3.5))   # 4 (偶数)# 向上取整import mathprint(math.ceil(3.1))   # 4print(math.ceil(-3.1))  # -3# 向下取整print(math.floor(3.9))   # 3print(math.floor(-3.1))  # -4# 截断(去掉小数部分)print(math.trunc(3.9))   # 3print(math.trunc(-3.9))  # -3

3. 浮点数精度问题

# ⚠️ 浮点数精度问题print(0.1 + 0.2)  # 0.30000000000000004 (不是0.3!)print(0.1 + 0.2 == 0.3)  # False# 查看精确值from decimal import Decimalprint(Decimal(0.1))  # 输出: 0.1000000000000000055511151231257827021181583404541015625# ✅ 解决方案1:使用round()result = round(0.1 + 0.210)print(result == 0.3)  # True# ✅ 解决方案2:使用math.isclose()import mathprint(math.isclose(0.1 + 0.20.3))  # True# ✅ 解决方案3:使用Decimalfrom decimal import Decimala = Decimal('0.1')b = Decimal('0.2')print(a + b)  # 0.3print(a + b == Decimal('0.3'))  # True# ✅ 解决方案4:比较差值epsilon = 1e-10print(abs(0.1 + 0.2 - 0.3) < epsilon)  # True

4. 浮点数的方法

# is_integer() - 判断是否为整数print((3.0).is_integer())   # Trueprint((3.5).is_integer())   # False# as_integer_ratio() - 返回分数形式print((0.5).as_integer_ratio())   # (12)print((0.25).as_integer_ratio())  # (14)print((3.14).as_integer_ratio())  # (70706514149716792251799813685248)# hex() - 转换为十六进制print((3.14).hex())  # '0x1.91eb851eb851fp+1'# fromhex() - 从十六进制创建f = float.fromhex('0x1.91eb851eb851fp+1')print(f)  # 3.14

四、复数(complex)

1. 复数的创建

# 方式1:直接创建c1 = 3 + 4jc2 = 5j  # 纯虚数c3 = 2 + 0j  # 实数# 方式2:使用complex()c4 = complex(34)  # 3+4jc5 = complex(5)     # 5+0jc6 = complex('3+4j')  # 从字符串print(c1, c4)  # (3+4j) (3+4j)# ⚠️ 注意:j前面必须有数字# c = 3 + j  # 错误!c = 3 + 1j  # 正确

2. 复数的属性

c = 3 + 4j# 实部print(c.real)  # 3.0# 虚部print(c.imag)  # 4.0# 共轭复数print(c.conjugate())  # (3-4j)# 模(绝对值)print(abs(c))  # 5.0 (sqrt(3^2 + 4^2))

3. 复数的运算

c1 = 3 + 4jc2 = 1 + 2j# 加法print(c1 + c2)  # (4+6j)# 减法print(c1 - c2)  # (2+2j)# 乘法print(c1 * c2)  # (-5+10j)# 除法print(c1 / c2)  # (2.2-0.4j)# 幂运算print(c1 ** 2)  # (-7+24j)# 使用cmath模块import cmath# 相位角print(cmath.phase(c1))  # 0.9272952180016122 (弧度)# 极坐标形式r, theta = cmath.polar(c1)print(f"r={r}, θ={theta}")  # r=5.0, θ=0.9272952180016122# 从极坐标创建c3 = cmath.rect(50.927)print(c3)  # (3+4j)# 欧拉公式:e^(iθ) = cos(θ) + i*sin(θ)print(cmath.exp(1j * cmath.pi))  # (-1+0j)

五、数学函数(math模块)

import math# 常量print(math.pi)   # 3.141592653589793print(math.e)    # 2.718281828459045print(math.tau)  # 6.283185307179586 (2π)print(math.inf)  # infprint(math.nan)  # nan# 三角函数print(math.sin(math.pi / 2))  # 1.0print(math.cos(0))            # 1.0print(math.tan(math.pi / 4))  # 1.0# 反三角函数print(math.asin(1))  # 1.5707963267948966 (π/2)print(math.acos(0))  # 1.5707963267948966print(math.atan(1))  # 0.7853981633974483 (π/4)# 双曲函数print(math.sinh(1))  # 1.1752011936438014print(math.cosh(0))  # 1.0print(math.tanh(1))  # 0.7615941559557649# 指数和对数print(math.exp(1))      # 2.718281828459045 (e^1)print(math.log(10))     # 2.302585092994046 (ln(10))print(math.log10(100))  # 2.0 (log₁₀(100))print(math.log2(8))     # 3.0 (log₂(8))# 幂和根print(math.pow(23))   # 8.0print(math.sqrt(16))    # 4.0print(math.cbrt(27))    # 3.0 (立方根, Python 3.11+)# 取整print(math.ceil(3.1))   # 4print(math.floor(3.9))  # 3print(math.trunc(3.9))  # 3# 其他函数print(math.fabs(-5))    # 5.0 (绝对值)print(math.factorial(5)) # 120 (5!)print(math.gcd(1218))  # 6 (最大公约数)print(math.lcm(1218))  # 36 (最小公倍数, Python 3.9+)# 判断函数print(math.isnan(float('nan')))  # Trueprint(math.isinf(float('inf')))  # Trueprint(math.isfinite(100))        # True

六、数字类型转换

# int → floati = 10f = float(i)print(f)  # 10.0# float → int (截断)f = 3.9i = int(f)print(i)  # 3# str → ints = '100'i = int(s)print(i)  # 100# str → floats = '3.14'f = float(s)print(f)  # 3.14# int → stri = 100s = str(i)print(s)  # '100'# float → strf = 3.14s = str(f)print(s)  # '3.14'# 进制转换num = 255# int → bin (二进制字符串)print(bin(num))  # '0b11111111'# int → oct (八进制字符串)print(oct(num))  # '0o377'# int → hex (十六进制字符串)print(hex(num))  # '0xff'# str → int (指定进制)print(int('11111111'2))  # 255print(int('377'8))       # 255print(int('ff'16))       # 255# 格式化输出num = 42print(f'{num:b}')   # 101010 (二进制)print(f'{num:o}')   # 52 (八进制)print(f'{num:x}')   # 2a (十六进制)print(f'{num:X}')   # 2A (大写十六进制)

七、数字格式化

# 基本格式化num = 3.141592653589793# 保留小数位数print(f'{num:.2f}')  # 3.14print(f'{num:.4f}')  # 3.1416# 千位分隔符big_num = 1234567890print(f'{big_num:,}')   # 1,234,567,890print(f'{big_num:_}')   # 1_234_567_890# 百分比ratio = 0.85print(f'{ratio:.2%}')  # 85.00%# 科学计数法print(f'{big_num:.2e}')  # 1.23e+09print(f'{big_num:.2E}')  # 1.23E+09# 对齐和填充num = 42print(f'{num:>10}')   # '        42' (右对齐)print(f'{num:<10}')   # '42        ' (左对齐)print(f'{num:^10}')   # '    42    ' (居中)print(f'{num:0>10}')  # '0000000042' (填充0)# 正负号positive = 42negative = -42print(f'{positive:+}')  # '+42'print(f'{negative:+}')  # '-42'print(f'{positive: }')  # ' 42' (正数前加空格)# 组合使用price = 1234.5print(f'{price:>10,.2f}')  # '  1,234.50'

八、随机数(random模块)

import random# 随机浮点数 [0.0, 1.0)print(random.random())  # 0.37444887175646646# 随机整数 [a, b]print(random.randint(110))  # 7# 随机整数 [a, b)print(random.randrange(110))  # 8# 随机浮点数 [a, b]print(random.uniform(1.010.0))  # 5.234567# 从序列中随机选择choices = ['apple', 'banana', 'orange']print(random.choice(choices))  # 'banana'# 随机选择多个(可重复)print(random.choices(choices, k=3))  # ['apple', 'apple', 'orange']# 随机选择多个(不重复)print(random.sample(choices, k=2))  # ['orange', 'apple']# 打乱列表data = [1, 2, 3, 4, 5]random.shuffle(data)print(data)  # [3, 1, 5, 2, 4]# 设置随机种子(可重现)random.seed(42)print(random.random())  # 0.6394267984578837random.seed(42)print(random.random())  # 0.6394267984578837 (相同)# 高斯分布print(random.gauss(01))  # -0.234567 (均值0,标准差1)

九、高精度计算(decimal模块)

from decimal import Decimal, getcontext# 创建Decimald1 = Decimal('0.1')d2 = Decimal('0.2')# 精确计算print(d1 + d2)  # 0.3print(d1 + d2 == Decimal('0.3'))  # True# 设置精度getcontext().prec = 50  # 50位精度d = Decimal(1) / Decimal(7)print(d)  # 0.14285714285714285714285714285714285714285714285714# 金融计算price = Decimal('19.99')quantity = Decimal('3')tax_rate = Decimal('0.08')subtotal = price * quantitytax = subtotal * tax_ratetotal = subtotal + taxprint(f'小计: ${subtotal:.2f}')  # 小计: $59.97print(f'税: ${tax:.2f}')         # 税: $4.80print(f'总计: ${total:.2f}')     # 总计: $64.77# 四舍五入控制from decimal import ROUND_HALF_UP, ROUND_DOWN, ROUND_UPd = Decimal('2.5')print(d.quantize(Decimal('1'), rounding=ROUND_HALF_UP))  # 3print(d.quantize(Decimal('1'), rounding=ROUND_DOWN))     # 2print(d.quantize(Decimal('1'), rounding=ROUND_UP))       # 3

十、分数(fractions模块)

from fractions import Fraction# 创建分数f1 = Fraction(34)  # 3/4f2 = Fraction(12)  # 1/2print(f1)  # 3/4print(f2)  # 1/2# 从字符串创建f3 = Fraction('3/4')f4 = Fraction('0.5')# 从浮点数创建f5 = Fraction(0.5)print(f5)  # 1/2f6 = Fraction(0.1)print(f6)  # 3602879701896397/36028797018963968 (精确表示)# 运算print(f1 + f2)  # 5/4print(f1 - f2)  # 1/4print(f1 * f2)  # 3/8print(f1 / f2)  # 3/2# 自动约分f = Fraction(68)print(f)  # 3/4 (自动约分)# 获取分子分母print(f.numerator)    # 3print(f.denominator)  # 4# 转换为浮点数print(float(f1))  # 0.75# 限制分母f = Fraction(3.14159)print(f.limit_denominator(100))  # 22/7 (π的近似)print(f.limit_denominator(1000)) # 355/113 (更精确的π近似)

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 12:22:17 HTTP/2.0 GET : https://f.mffb.com.cn/a/474098.html
  2. 运行时间 : 0.085752s [ 吞吐率:11.66req/s ] 内存消耗:4,723.08kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=8d51d58e055d9f1315d4f4950a40174c
  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.000569s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000901s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000285s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000261s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000708s ]
  6. SELECT * FROM `set` [ RunTime:0.000196s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000689s ]
  8. SELECT * FROM `article` WHERE `id` = 474098 LIMIT 1 [ RunTime:0.000467s ]
  9. UPDATE `article` SET `lasttime` = 1770438137 WHERE `id` = 474098 [ RunTime:0.010968s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000229s ]
  11. SELECT * FROM `article` WHERE `id` < 474098 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000469s ]
  12. SELECT * FROM `article` WHERE `id` > 474098 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000421s ]
  13. SELECT * FROM `article` WHERE `id` < 474098 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000969s ]
  14. SELECT * FROM `article` WHERE `id` < 474098 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000913s ]
  15. SELECT * FROM `article` WHERE `id` < 474098 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000795s ]
0.087474s