当前位置:首页>python>Python格式化输出、运算符、分支&循环

Python格式化输出、运算符、分支&循环

  • 2026-06-29 12:05:58
Python格式化输出、运算符、分支&循环
Python格式化输出、运算符、分支&循环

一、Python格式化输出

1 字符串格式化输出

1.1 +连接

  在Python中,+主要有两个作用:

  第一个作用:数学运算符  —>  用于整形、浮点型等数学直接进行加法操作;

  第二个作用:用来进行字符串连接  —>  字符串+字符串(只能同类型相加,不同类型相加要类型转换,很麻烦 不同类型拼接在一起更便捷,就需要用到格式化输出);

  所谓格式化  —>  一种更好的输出方式

   可以让你更方便的输出带有变量的数据

   可以让你更方便的输出一些固定格式的数据


1.2 f-str形式

  • 最简单方便粗暴的输出方式;
  • 语法:在字符串前面加f/F,在字符串中把要输出的变量,用大括号{}包裹起来;
  • f'{变量}……{}'
money = 99.9food = '一大堆零食'print(str(money) + food)# + 拼接print("小明用了" + str(money) + "元" + "买了" + food)# f-str形式print(f'小明用了{money}元买了{food}')

  上面的输出:

f-str形式:print(f'小明用了{money}元买了{food}')不需要进行强制数据类型转换,即str(money)

+拼接:print("小明用了" + str(money) + "元" + "买了" + food)需要使用+,并且还需要进行数据类型强制转换,即str(money)

  遍历加f/F-str类型:

# 群发转发name = ['父亲''母亲''舅舅''妹妹''姐姐''哥哥']# 使用循环来进行索引遍历得到列表name中的数据for i in name:print(F'{i},新年快乐哦,祝愿新的一年心想事成,事业蒸笼、步步高升。')

1.3 占位符

  • 通过占位符先占一个位置,后续再用具体值补上
  • %s —> str类型 —— 占位置,放字符串
  • %d —> int类型 —— 占位置,放整型(有小数点的,小数点会被抹除)
  • %f —> float类型 —— 占位置,放浮点数(默认6位小数)
    • %.1f —> 带一位小数
    • %.2f —> 带两位小数
    • %.xf —> 带x位小数
  • 语法格式: print('XX%sXX%d' % (数据1,数据2))
# 占位符str1 = '小明'str2 = '小红'str3 = 10str4 = 480.5print('%s同学在%d号这天,与%s同学相约逛昆明南屏街,两人在这天一共花费了%.1f' %(str1, str3, str2, str4))

  占位符的应用:

# 占位符的应用 班级平均分num = int(input("请输入高三三班学生人数:"))grade = float(input("请输入高三三班学生平均分:"))name = str(input("请输入高三三班学生授课老师:"))print('''    ----------高三三班学生----------    班级人数:%d    班级平均分:%.2f    班级授课老师:%s    '''    %(num, grade, name))

特殊注意事项

  • “一个萝卜一个坑”,需要注意前后所用的%对应的数据类型必须对应,否则会报错;
  • 对应的位置不能少,少位置或者多位置都不可以;
  • 放的都是已知数据,不可更改;

1.4 format

format的用法跟占位符,f-str类似。它是用大括号作为占位符,在字符串后面通过.format来填上数据;   语法格式:print('xxx{下标}xxx{下标}'.format(数据1,数据2))

# formatnameId = 144658972212name = "风中的砂砾"times = "2026-06-08 05:00:00"password = 999999999999print("我的QQ号ID:{},QQ号昵称“{}”,创建时间{},QQ号密码是:{}。".format(nameId, name, times, password))

  下标来识别对应的位置:

# 下标位置对应name1 = '小红'name2 = '小明'grade = 98.25print("同学{}和同学{},他们的分数是:{}。".format(name1, name2, grade))print("同学{}的分数是:{};同学{}的分数是:{}。".format(name1, grade, name2, grade))print("同学{0}的分数是:{1};同学{2}的分数是:{3}。".format(name1, grade, name2, grade)) # 下标要从0开始,如果从1开始会报错,报:IndexError: tuple index out of range

1.5 总结三种格式化字符串的特点

类型
说明
应用或注意
f-str
在字符串前面加f/F,使用{}来放入变量,语法最简洁,易读
{}中可以直接进行数学运算或切片、索引等操作
% - 占位符
使用%操作符号进行占位,%后面填充数据
多种操作说明符:%s字符串、%d整型、%f浮点数
format
字符串中用{}占位,.format()在小括号中放入数据,比较灵活,可以通过下标来锁定数据
变量如果重复使用,传一次就可以,放上变量对应的下标

二、运算符

1 赋值运算符

  把右侧值赋给左侧变量

a = 10b = a # 把a的值10赋给变量b

  常见的赋值运算符:

运算符
示例
等价写法
运算符名称
含义
+=a += 2a = a + 2
加后赋值
先加,再将结果赋回变量
-=a -= 2a = a - 2
减后赋值
先减,再将结果赋回变量
*=a *= 2a = a * 2
乘后赋值
先乘,再将结果赋回变量
/=a /= 2a = a / 2
(结果浮点)
除后赋值
先除,再将结果赋回变量
//=a //= 2a = a // 2
(整数除法)
整除后赋值
先整除,再将结果赋回变量
%=a %= 2a = a % 2
(取余)
取余后赋值
先取余,再将结果赋回变量
**=a **= 2a = a ** 2
(幂运算)
幂后赋值
先求幂(次方),再将结果赋回变量
a = 5a += 1# 6a -= 2# 4a *= 3# 12a /= 2# 6.0a //= 2# 3.0a %= 2# 1.0a **= 3# 1.0

2 比较运算符

  用于判断两个值的大小,相等关系,结果只有True(真)False(假)

运算符
汉字解说
含义
示例
结果
==等于
判断两边的值是否相等
5 == 5
True
!=不等于
判断两边的值是否不相等
3 != 2
True
>大于
判断左边是否大于右边
5 > 10
False
<小于
判断左边是否小于右边
5 < 1
False
>=大于等于
判断左边是否大于或等于右边
9 >= 8
True
<=小于等于
判断左边是否小于或等于右边
5 <= 3
True
a = 10b = 20print(a == b)   # Falseprint(a != b)   # Trueprint(a > b)    # Falseprint(a < b)    # Trueprint(a >= 10)  # Trueprint(b <= 15)  # False

  身份与成员比较:

运算符
汉字解说
含义
is是同一对象
判断两边是否为同一个内存对象(不仅值相等)
is not非同一对象
判断两边是否不是同一个内存对象
in属于 / 包含于
判断左边元素是否存在于右边的序列中
not in不属于 / 不包含于
判断左边元素是否不存在于右边的序列中

说明

  • ==
     比较是否相等;is 比较身份(内存地址)是否相同。
  • 判断 None 时应使用 isif x is None:

3 逻辑运算符

  逻辑运算符用来连接多个判断条件,最终结果只有真(True)、假(False)

  • and:两边条件全为真,结果才是真;只要有一个假,整体就是假
  • or:两边条件,只要有一个为真,结果就是真,只有两边都是假,结果才是假
  • not:把原有结果颠倒真变假,假变真
  • 运算优先级:not > and > or
  • 逻辑判断中:数字 0、空字符串、空列表、None 都代表假,其余代表真。
运算符
汉字解说
含义
and逻辑与
 / 
两边都为真时结果才为真
or逻辑或
 / 
两边只要有一个为真结果就为真
not逻辑非
 / 取反
将真变为假,将假变为真

重要特性:短路求值

表达式
求值过程
结果
A and B
若 A 为假,直接返回 A,不再看 B
假值短路
A or B
若 A 为真,直接返回 A,不再看 B
真值短路

三、分支结构

  Python的分支结构,是Python根据条件执行不同的代码块

  在Python中,构造分支结构最常用的是ifelifelse三个关键字。所谓关键字就是编程语言中有特殊意义的单词,很显然我们不能使用它作为变量名。当然,并不是我们每次构造分支结构,都会将这三个关键字用上。

通过例子加以说明

  例如我们要写一个身体质量指数(BMI)的计算器。身体质量指数也叫体质指数,是国际上常用的衡量人体胖瘦程度以及是否健康的一个指标,计算公式如下所示。通常认为:BMI小于18.5说明体重过轻;BMI小于24属于正常范围;BMI大于24说明体重过重;BMI大于27就属于肥胖的范围了;

说明:上面公式中的体重以千克(kg)为单位,身高以米(m)为单位。

# 单分支height = float(input('身高(cm):'))weight = float(input('体重(kg):'))bmi = weight / (height / 100) ** 2print(f'你的身体质量指数为:{bmi:.2f}')if18.5 <= bmi < 24:print('你的身材很棒!')

  当输入身高162;体重65,经过计算后BMI的值为24.77,显然这个值不在[18.5,24)范围内,故if后面的程序代码就不执行;

  当输入身高163;体重50,经过计算后BMI的值为18.82,显然这个值在[18.5,24)范围内,故if后面的程序代码执行;

# 双分支height = float(input('身高(cm):'))weight = float(input('体重(kg):'))bmi = weight / (height / 100) ** 2print(f'你的身体质量指数为:{bmi:.2f}')if18.5 <= bmi < 24:print('你的身材很棒!')else:print("你的身体似乎不太健康哦,请特别注意哦!")

  当输入身高163;体重40,经过计算后BMI的值为15.06,显然这个值不在[18.5,24)范围内,故if后面的程序代码不执行,执行else后面的程序代码;

# 多分支height = float(input('身高(cm):'))weight = float(input('体重(kg):'))bmi = weight / (height / 100) ** 2print(f'你的身体质量指数为:{bmi:.2f}')if bmi < 18.5:print('你太瘦了,要多吃肉哦!')elif bmi < 24:print('你的身材很棒!')elif bmi < 27:print('你偏胖了,要多运动,注意荤素搭配哦!')else:print("你太胖了,要多运动啊!")

   第一组数据:当输入身高167;体重50,经过计算后BMI的值为17.93,显然这个值小于18.5,执行if后面的程序代码;

   第二组数据:当输入身高175;体重68,经过计算后BMI的值为22.20,显然这个值小于24,执行第一个elif后面的程序代码;

   第三组数据:当输入身高175;体重80,经过计算后BMI的值为26.12,显然这个值小于27,故执行第二个elif后面的程序代码;

   第四组数据:当输入身高175;体重89,经过计算后BMI的值为29.06,显然这个值大于27,故执行else后面的程序代码;

1 三种基础的分支结构

1.1 单分支

单分支if语句(满足条件才执行)

语法

if 条件:   条件成立时执行
  • 条件结果为True就执行内部代码,否则就跳过;
  • 注意
    if末尾必须加上冒号,内部代码必须缩进(4个空格/1个Tab)
age = 18if age >= 18:print("你成年了!")

1.2 双分支

双分支if ... else ...(二选一执行)

语法

if 条件:   条件成立执行代码else:   条件不成立执行代码
  • 条件结果为True就执行内部代码,否则就跳到else后;
age = 16if age >= 18:print("成年人")else:print("未成年人")

1.3 多分支

多分支if ... elif ... else ...(多选一)

语法

if 条件1:   代码1elif 条件2:   代码2elif 条件3:   代码3else:   以上条件都不满足时执行的代码
  • 如果if条件结果为True就执行内部代码,否则就跳到elif后,如果elif结果还为假,就跳到else后,否则执行elif后的代码;
  • elif
     可以写多个
  • else
     可选,不是必须写
score = 85if score >= 90:print("优秀")elif score >= 80:print("良好")elif score >= 60:print("及格")else:print("不及格")

2 嵌套分支

  在if/elif/else内部继续写if,用于多层判断场景

  语法:

if 外层条件:if 内层条件:        代码else:        代码else:    代码
age = 20has_id = Trueif age >= 18:if has_id:print("允许进入")else:print("成年但无证件,禁止进入")else:print("未成年,禁止进入")

3 分支结构的应用

3.1 分段函数求值

  有如下分段函数,要求输入`x`,计算出`y`的值:
# 分段函数求值x = float(input('请输入x的值:'))if x > 1:    y = 3 * x - 5elif x < -1:    y = 5 * x - 4else:    y = x + 2print(y)

  嵌套分支结构:

# 嵌套分支x = float(input('请输入x的值:'))if x > 1:    y = 3 * x - 5else:if x >= -1:        y = x + 2else:        y = 5 * x - 4print(y)

说明:大家可以自己感受和评判一下上面两种写法哪一种更好。在“Python 之禅”中有这么一句话:“Flat is better than nested”。之所以认为“扁平化”的代码更好,是因为代码嵌套的层次如果很多,会严重的影响代码的可读性。所以,我个人更推荐大家使用第一种写法。


3.2 百分制成绩转换成等级

要求:如果输入的成绩在90分以上(含90分),则输出A;输入的成绩在80分到90分之间(不含90分),则输出B;输入的成绩在70分到80分之间(不含80分),则输出C;输入的成绩在60分到70分之间(不含70分),则输出D;输入的成绩在60分以下,则输出E

# 百分制成绩转换成等级score = float(input('请输入个人成绩:'))if score >= 90:    print(f'你的个人成绩等级为A。')elif score >= 80:    print(f'你的个人成绩等级为B。')elif score >= 70:    print(f'你的个人成绩等级为C。')elif score >= 60:    print(f'你的个人成绩等级为D。')else:    print(f'你的个人成绩等级为E。')

3.3 计算三角形的周长和面积

要求:输入三条边的长度,如果能构成三角形就计算周长和面积;否则给出“不能构成三角形”的提示。

判断三角形是否成立,三角形的三条边都需要满足以下两点

  • 每条边都大于0
  • 任意两边之和大于第三边,即:
    • a + b > c
    • a + c > b
    • b + c > a
a = float(input('输入三角形的第一条边:'))b = float(input('输入三角形的第二条边:'))c = float(input('输入三角形的第三条边:'))if (a > 0and b > 0and c > 0and a + b > c and a + c > b and b + c > a:# 计算周长    p = a + b + c    print(f'三角形的周长为:{p}。')# 计算面积,使用【海伦公式】求解    p = (a + b + c) / 2    s = (p * (p - a) * (p - b) * (p - c)) ** 0.5    print('三角形的面积为:{}。'.format(s))    print('三角形的面积为:%.2f。' %(s))else:    print('不能构成三角形。')

四、循环结构

  循环作用:重复执行一段代码,Python 主要有 while 循环for 循环,搭配跳转语句使用。

1 while循环

1.1 基本语法

while 条件表达式:    循环体代码
  • 规则:条件为 True,就一直执行循环体;条件为 False,结束循环

  • 必备要点:一定要设置条件变更,否则会造成死循环

  • 代码块靠缩进区分

1.2 基础示例

# 打印1 到 8i = 1while i <= 8:    print(i)    i += 1

1.3 死循环

  条件永远为真,代码无限执行,按 Ctrl + C 强制终止。

# 死循环whileTrue:    print('死循环执行中********')

1.4 while + else

  循环正常结束(不是被 break 打断)后,会执行 else 代码。

i = 1while i <= 3:    print(i)    i += 1else:    print("循环正常结束")

2 for循环

  多用于遍历序列(字符串、列表、元组、range 区间等),按元素逐个循环。

1 基本语法

for 变量 in 可迭代对象:    循环体代码

2 搭配 range () 函数(最常用)

range(起始值, 结束值, 步长)

  • 取值范围:左闭右开,取不到结束值

  • 省略起始值:默认从 0 开始

  • 省略步长:默认步长为 1

# 0~4for i inrange(5):    print(i)# 1~5for i inrange(16):    print(i)# 1、3、5  步长2for i inrange(172):    print(i)

3 遍历字符串 / 列表

  遍历字符串:

# 遍历字符串s = "Hello, Word! Nice to meet you!"for i in s:    print(i, end=''# 输出后空格分隔不换行

  遍历列表:

# 遍历列表# 取0 到 5内的值,并对每个值求平方存于列表ss中ss = [i ** for i inrange(6)]for i in ss:  print(i, end=' '# 0 1 4 9 16 25

4 for + else

  和 while-else 规则一致:循环正常遍历完毕才执行 else

for i inrange(3):    print(i)else:    print("for 循环执行完毕")

3 循环跳转语句

1 break

作用:立刻终止整个循环,跳出循环体,后续代码不再执行。

for i inrange(16):    if i == 3:        break# 遇到3,直接结束循环    print(i) # 输出:1 2

2 continue

作用:跳过当前这一次循环,直接进入下一轮循环,不会终止整体循环。

# continuefor i inrange(1206):    if i % 3 == 0:        continue    print(i, end='  '# 1  7  13  19 

重点区分:

  • break
    彻底结束循环
  • continue
    只跳过当前一轮

3 嵌套的循环结构

  和分支结构一样,循环结构也是可以嵌套的,也就是说在循环结构中还可以构造循环结构。

示例:九九乘法表

# 九九乘法表for i inrange(110):    for j inrange(1, i + 1):        print(f'{i} * {j} = {i * j}', end='  ')    print()

4 核心注意事项

  1. 缩进
    循环体内代码必须统一缩进,否则报错
  2. 死循环
    while 循环务必修改循环条件;while True 需配合 break 退出
  3. range 左闭右开
    range(1,5) 只取 1、2、3、4
  4. else 触发条件
    只有循环正常走完才执行,被 break 打断则不执行 else
  5. 嵌套循环:break/continue 只作用于当前所在的内层循环,不影响外层

for vs while 选择:

场景
推荐
已知遍历次数 / 有明确序列
for
条件驱动,次数不确定
while
需要索引
for + enumerate
等待某个事件/状态
while

循环控制关键字

关键字
作用
类比
break立即终止
整个循环
跳出
continue跳过当前
迭代,进入下一次
跳过
else
循环正常结束(未 break)后执行
收尾

补充知识点

print(i) == print(i, end='\n')

  • end='':输出后不换行,紧跟下一个输出
  • end=' ':输出后空格分隔不换行
  • 默认 end='\n':输出后换行

4 循环结构的应用

猜数字游戏:计算机出一个 1 到 100 之间的随机数,玩家输入自己猜的数字,计算机给出对应的提示信息“大一点”、“小一点”或“猜对了”,如果玩家猜中了数字,计算机提示用户一共猜了多少次,游戏结束,否则游戏继续。

import randomanswer = random.randrange(1101)counter = 0whileTrue:    counter += 1    num = int(input('请输入: '))if num < answer:    print('大一点.')elif num > answer:    print('小一点.')else:    print('猜对了.')    breakprint(f'你一共猜了{counter}次.')

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 12:17:59 HTTP/2.0 GET : https://f.mffb.com.cn/a/498209.html
  2. 运行时间 : 0.164402s [ 吞吐率:6.08req/s ] 内存消耗:4,778.68kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=5eac28de08e74aafa0f25c63c22e4aaa
  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.000559s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000607s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.001924s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.017497s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000841s ]
  6. SELECT * FROM `set` [ RunTime:0.002579s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000605s ]
  8. SELECT * FROM `article` WHERE `id` = 498209 LIMIT 1 [ RunTime:0.007716s ]
  9. UPDATE `article` SET `lasttime` = 1783052279 WHERE `id` = 498209 [ RunTime:0.005813s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000305s ]
  11. SELECT * FROM `article` WHERE `id` < 498209 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.010683s ]
  12. SELECT * FROM `article` WHERE `id` > 498209 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.007655s ]
  13. SELECT * FROM `article` WHERE `id` < 498209 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000875s ]
  14. SELECT * FROM `article` WHERE `id` < 498209 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001258s ]
  15. SELECT * FROM `article` WHERE `id` < 498209 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.019370s ]
0.166377s