当前位置:首页>python>Python输入输出——让程序和人对话

Python输入输出——让程序和人对话

  • 2026-06-25 19:29:24
Python输入输出——让程序和人对话

一、输出:让程序说话

1.1 print()基础用法

print()是Python最常用的输出函数,负责把内容显示在屏幕上。

# 输出单个内容print("Hello World")print(123)print(3.14)print(True)# 输出多个内容(自动用空格分隔)print("姓名:""张三""年龄:"18)# 输出:姓名: 张三 年龄: 18# 输出空行print()

1.2 print()的完整语法

print(value1, value2, ..., sep=' ', end='\n', file=sys.stdout)

参数说明:

  • • sep:多个值之间的分隔符,默认是空格
  • • end:结尾字符,默认是换行符\n
  • • file:输出位置,默认是屏幕

1.3 sep参数——自定义分隔符

# 默认空格print("苹果""香蕉""橙子")  # 苹果 香蕉 橙子# 自定义分隔符print("苹果""香蕉""橙子", sep="、")  # 苹果、香蕉、橙子print("2024""01""15", sep="-")      # 2024-01-15print("192""168""1""1", sep=".")  # 192.168.1.1print("Hello""World", sep="")         # HelloWorld(无分隔符)

1.4 end参数——自定义结尾

# 默认换行print("第一行")print("第二行")# 输出:# 第一行# 第二行# 不换行print("第一行", end="")print("第二行", end="")print("第三行")# 输出:第一行第二行第三行# 自定义结尾print("正在加载", end="...")print("完成")# 输出:正在加载...完成# 实际应用:进度指示import timefor i inrange(5):print(f"\r进度:{i+1}/5", end="")    time.sleep(1)print("\n完成!")

1.5 格式化输出的三种方式

方式1:f-string(Python 3.6+ 推荐)

name = "小明"age = 18score = 95.5print(f"姓名:{name},年龄:{age},分数:{score}")# 姓名:小明,年龄:18,分数:95.5# 表达式计算print(f"10年后{name}的年龄:{age + 10}")# 调用方法print(f"大写名字:{name.upper()}")# 格式化数字price = 19.995print(f"价格:{price:.2f}元")    # 价格:20.00元print(f"百分比:{0.856:.1%}")    # 百分比:85.6%print(f"左对齐:{name:<10}")     # 左对齐,宽度10print(f"右对齐:{name:>10}")     # 右对齐print(f"居中:{name:^10}")       # 居中

方式2:format()方法

# 位置参数print("{}今年{}岁".format("小明"18))# 索引参数print("{1}今年{0}岁".format(18"小明"))  # 小明今年18岁# 关键字参数print("{name}今年{age}岁".format(name="小明", age=18))# 格式化数字print("{:.2f}".format(3.14159))  # 3.14print("{:,}".format(1000000))    # 1,000,000

方式3:%格式化(旧式)

name = "小明"age = 18print("%s今年%d岁" % (name, age))  # 小明今年18岁# %s 字符串,%d 整数,%f 浮点数print("%.2f" % 3.14159)  # 3.14

二、输入:让程序听你说话

2.1 input()基础用法

input()函数让程序暂停,等待用户输入,输入的任何内容都会作为字符串返回

# 基本输入name = input("请输入你的姓名:")print(f"你好,{name}")# 不写提示语也行data = input()print(f"你输入了:{data}")

2.2 输入的返回值永远是字符串

# ❌ 常见错误age = input("请输入年龄:")next_year = age + 1# 报错!age是字符串# ✅ 正确做法age = int(input("请输入年龄:"))next_year = age + 1print(f"明年你{next_year}岁")

2.3 处理多种输入

# 输入多个值(空格分隔)data = input("请输入两个数字(空格分隔):")a, b = data.split()  # split()默认按空格分割a = int(a)b = int(b)print(f"和:{a + b}")# 输入多个值(逗号分隔)data = input("请输入姓名、年龄、城市(逗号分隔):")name, age, city = data.split(",")age = int(age)print(f"姓名:{name},年龄:{age},城市:{city}")

三、输入输出的实战应用

案例1:个人信息收集

print("=" * 40)print("        个人信息登记系统")print("=" * 40)# 收集信息name = input("请输入姓名:")age = int(input("请输入年龄:"))height = float(input("请输入身高(cm):"))weight = float(input("请输入体重(kg):"))city = input("请输入所在城市:")hobby = input("请输入爱好:")# 计算BMIheight_m = height / 100bmi = weight / (height_m ** 2)# 输出信息卡print("\n" + "=" * 40)print("        个 人 信 息 卡")print("=" * 40)print(f"姓名:{name}")print(f"年龄:{age}岁")print(f"身高:{height:.1f}cm")print(f"体重:{weight:.1f}kg")print(f"BMI:{bmi:.1f}")print(f"城市:{city}")print(f"爱好:{hobby}")print("=" * 40)# BMI判断if bmi < 18.5:print("体型:偏瘦")elif bmi < 24:print("体型:正常")elif bmi < 28:print("体型:偏胖")else:print("体型:肥胖")

案例2:猜数字游戏

import randomprint("=" * 40)print("        猜 数 字 游 戏")print("=" * 40)print("我已经想好了一个1-100之间的数字")# 生成随机数secret = random.randint(1100)attempts = 0max_attempts = 7while attempts < max_attempts:# 获取玩家输入try:        guess = input(f"\n还剩{max_attempts - attempts}次机会,请猜数:")        guess = int(guess)except ValueError:print("请输入有效的数字!")continue    attempts += 1# 判断if guess < secret:print("猜小了,再大一点")elif guess > secret:print("猜大了,再小一点")else:print(f"\n🎉 恭喜!你猜对了!用了{attempts}次机会")breakelse:print(f"\n😢 游戏结束,答案是{secret}")print("\n游戏结束,感谢游玩!")

案例3:简单的计算器

print("=" * 40)print("        简 易 计 算 器")print("=" * 40)print("支持运算:+ - * /")whileTrue:print("\n" + "-" * 40)# 获取第一个数try:        num1 = float(input("请输入第一个数字:"))except ValueError:print("输入无效,请重新开始")continue# 获取运算符    op = input("请输入运算符(+ - * /):")if op notin ['+''-''*''/']:print("不支持的运算符")continue# 获取第二个数try:        num2 = float(input("请输入第二个数字:"))except ValueError:print("输入无效,请重新开始")continue# 计算if op == '+':        result = num1 + num2elif op == '-':        result = num1 - num2elif op == '*':        result = num1 * num2else:  # op == '/'if num2 == 0:print("错误:除数不能为0")continue        result = num1 / num2# 输出结果if result.is_integer():print(f"\n结果:{num1}{op}{num2} = {int(result)}")else:print(f"\n结果:{num1}{op}{num2} = {result:.2f}")# 是否继续    again = input("\n继续计算?(y/n):")if again.lower() != 'y':print("感谢使用,再见!")break

案例4:登录系统

deflogin_system():"""简单的登录系统"""print("=" * 40)print("        用 户 登 录")print("=" * 40)# 预设用户数据    users = {"admin""123456","user1""abc123","test""test123"    }    max_attempts = 3    attempts = 0while attempts < max_attempts:print(f"\n剩余尝试次数:{max_attempts - attempts}")# 输入用户名和密码        username = input("用户名:")        password = input("密码:")# 检查输入是否为空ifnot username ornot password:print("用户名和密码不能为空!")            attempts += 1continue# 验证if username in users and users[username] == password:print(f"\n✅ 登录成功!欢迎{username}")# 显示菜单print("\n1. 查看个人信息")print("2. 修改密码")print("3. 退出")            choice = input("请选择:")if choice == '1':print(f"用户名:{username}")print(f"密码:{'*' * len(password)}")elif choice == '2':                new_pass = input("新密码:")                users[username] = new_passprint("密码修改成功")returnTrueelse:print("❌ 用户名或密码错误")            attempts += 1print("\n❌ 尝试次数过多,账号已锁定")returnFalse# 运行登录# login_system()

案例5:成绩录入系统

defgrade_entry_system():"""成绩录入系统"""print("=" * 50)print("        成 绩 录 入 系 统")print("=" * 50)    students = []whileTrue:print("\n1. 添加学生成绩")print("2. 查看所有成绩")print("3. 统计报表")print("4. 退出")        choice = input("请选择(1-4):")if choice == '1':# 添加学生            name = input("学生姓名:")# 输入成绩try:                chinese = float(input("语文成绩:"))                math = float(input("数学成绩:"))                english = float(input("英语成绩:"))# 验证成绩范围ifnot (0 <= chinese <= 100and0 <= math <= 100and0 <= english <= 100):print("成绩必须在0-100之间")continue# 计算总分和平均分                total = chinese + math + english                average = total / 3# 保存数据                student = {'name': name,'chinese': chinese,'math': math,'english': english,'total': total,'average': average                }                students.append(student)print(f"✅ 学生{name}的成绩录入成功")except ValueError:print("请输入有效的数字")elif choice == '2':# 查看所有成绩ifnot students:print("还没有学生数据")continueprint("\n" + "=" * 60)print(f"{'姓名':<10}{'语文':<8}{'数学':<8}{'英语':<8}{'总分':<8}{'平均分':<8}")print("=" * 60)for s in students:print(f"{s['name']:<10}{s['chinese']:<8.1f}{s['math']:<8.1f}"f"{s['english']:<8.1f}{s['total']:<8.1f}{s['average']:<8.1f}")elif choice == '3':# 统计报表ifnot students:print("还没有学生数据")continue# 计算班级平均            avg_chinese = sum(s['chinese'for s in students) / len(students)            avg_math = sum(s['math'for s in students) / len(students)            avg_english = sum(s['english'for s in students) / len(students)# 最高分            max_student = max(students, key=lambda s: s['total'])print("\n" + "=" * 40)print("        成 绩 统 计")print("=" * 40)print(f"总人数:{len(students)}")print(f"语文平均分:{avg_chinese:.1f}")print(f"数学平均分:{avg_math:.1f}")print(f"英语平均分:{avg_english:.1f}")print(f"最高分学生:{max_student['name']} "f"(总分:{max_student['total']:.1f})")elif choice == '4':print("感谢使用成绩录入系统!")breakelse:print("无效选择,请重新输入")# grade_entry_system()

四、高级输入输出技巧

4.1 密码输入(隐藏显示)

# 需要导入getpass模块import getpass# 密码输入时不显示username = input("用户名:")password = getpass.getpass("密码:")  # 输入时不显示print(f"用户名:{username}")print(f"密码:{'*' * len(password)}")

4.2 带超时的输入

import sysimport selectimport timedefinput_with_timeout(prompt, timeout):"""带超时的输入函数"""print(prompt, end='', flush=True)    ready, _, _ = select.select([sys.stdin], [], [], timeout)if ready:return sys.stdin.readline().rstrip('\n')returnNone# 使用示例print("你有5秒钟时间回答问题:")answer = input_with_timeout("Python的作者是谁?"5)if answer isNone:print("\n⏰ 时间到!")else:print(f"\n你的答案是:{answer}")

4.3 进度条显示

import timedefshow_progress(iterations):"""显示进度条"""for i inrange(iterations + 1):# 计算百分比        percent = i / iterations * 100# 进度条长度20        bar_length = 20        filled = int(bar_length * i / iterations)        bar = '█' * filled + '░' * (bar_length - filled)# 输出(\r回到行首)print(f"\r进度:|{bar}{percent:.1f}%", end="")        time.sleep(0.1)print()  # 最后换行print("正在下载...")show_progress(50)

4.4 表格输出

defprint_table(data, headers):"""打印表格"""# 计算每列宽度    col_widths = []for i, header inenumerate(headers):        col_width = len(header)for row in data:            col_width = max(col_width, len(str(row[i])))        col_widths.append(col_width + 2)  # 加2作为内边距# 打印分隔线defprint_sep():        line = "+"for w in col_widths:            line += "-" * w + "+"print(line)# 打印表头    print_sep()    header_line = "|"for i, header inenumerate(headers):        header_line += f" {header:<{col_widths[i]-1}}|"print(header_line)    print_sep()# 打印数据for row in data:        data_line = "|"for i, cell inenumerate(row):            data_line += f" {str(cell):<{col_widths[i]-1}}|"print(data_line)    print_sep()# 使用示例data = [    ["张三"1895],    ["李四"1987],    ["王五"1892]]headers = ["姓名""年龄""分数"]print_table(data, headers)

五、常见问题与解决方法

问题1:输入数字时直接报错

# ❌ 不好的做法age = int(input("年龄:"))  # 输入非数字就崩溃# ✅ 好的做法try:    age = int(input("年龄:"))except ValueError:print("请输入有效的数字")    age = 0

问题2:输入包含多余空格

# 用户可能输入 "  张三  "name = input("姓名:")print(f"你好,{name}")  # 输出:你好,  张三  # 使用strip()去除首尾空格name = input("姓名:").strip()print(f"你好,{name}")  # 输出:你好,张三

问题3:input()在IDLE中运行不同

# 在IDLE中运行input()不会显示提示语# 解决:先print提示,再inputprint("请输入姓名:", end="")name = input()

问题4:连续输入数字

# 一次性输入多个数字numbers = input("请输入多个数字(空格分隔):").split()numbers = [int(x) for x in numbers]print(f"总和:{sum(numbers)}")

六、输入输出最佳实践

6.1 输入验证模板

defget_int_input(prompt, min_val=None, max_val=None):"""获取整数输入,带范围验证"""whileTrue:try:            value = int(input(prompt))if min_val isnotNoneand value < min_val:print(f"输入不能小于{min_val}")continueif max_val isnotNoneand value > max_val:print(f"输入不能大于{max_val}")continuereturn valueexcept ValueError:print("请输入有效的整数")# 使用age = get_int_input("请输入年龄(0-150):"0150)score = get_int_input("请输入分数(0-100):"0100)

6.2 选择菜单模板

defmenu(options, title="请选择"):"""显示菜单并获取选择"""print(f"\n{title}")print("-" * 20)for i, option inenumerate(options, 1):print(f"{i}{option}")whileTrue:try:            choice = int(input("请输入编号:"))if1 <= choice <= len(options):return choiceelse:print(f"请输入1-{len(options)}之间的数字")except ValueError:print("请输入数字")# 使用choice = menu(["添加""删除""修改""查询"], "主菜单")if choice == 1:print("执行添加")elif choice == 2:print("执行删除")# ...

6.3 确认对话框

defconfirm(prompt, default=True):"""确认对话框"""if default:        prompt = f"{prompt} (Y/n):"else:        prompt = f"{prompt} (y/N):"whileTrue:        answer = input(prompt).strip().lower()ifnot answer:return defaultif answer in ['y''yes']:returnTrueif answer in ['n''no']:returnFalseprint("请输入 y 或 n")# 使用if confirm("确定要删除吗?", default=False):print("正在删除...")else:print("取消删除")

七、总结

输入输出核心要点

输出(print)

  • • 可输出多个值,用逗号分隔
  • • sep控制分隔符
  • • end控制结尾
  • • f-string是最方便的格式化方式

输入(input)

  • • 永远返回字符串
  • • 需要数字时要转换
  • • 输入可能需要验证和清洗

记忆口诀

输出用print,多个值逗号sep改分隔,end改结尾f-string最方便,花括号填变量输入用input,返回是字符串数字要转换,类型要判断验证加循环,程序更健壮

常用模式速查

# 1. 基本输出print(f"变量值:{variable}")# 2. 数字输入num = int(input("数字:"))# 3. 带验证的输入whileTrue:try:        num = int(input("数字:"))breakexcept:print("输入无效")# 4. 去除空格text = input().strip()# 5. 多个输入a, b = input().split()# 6. 不换行输出print("进度", end="")# 7. 格式化表格print(f"{'姓名':<10}{'分数':>5}")

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-05 04:12:32 HTTP/2.0 GET : https://f.mffb.com.cn/a/476373.html
  2. 运行时间 : 0.098050s [ 吞吐率:10.20req/s ] 内存消耗:4,567.65kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=b2c2816efff5f51dd4a0600945a4368d
  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.000652s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000897s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000283s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000312s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000493s ]
  6. SELECT * FROM `set` [ RunTime:0.000208s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000623s ]
  8. SELECT * FROM `article` WHERE `id` = 476373 LIMIT 1 [ RunTime:0.000695s ]
  9. UPDATE `article` SET `lasttime` = 1783195952 WHERE `id` = 476373 [ RunTime:0.021455s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000413s ]
  11. SELECT * FROM `article` WHERE `id` < 476373 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000590s ]
  12. SELECT * FROM `article` WHERE `id` > 476373 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000442s ]
  13. SELECT * FROM `article` WHERE `id` < 476373 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000715s ]
  14. SELECT * FROM `article` WHERE `id` < 476373 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000793s ]
  15. SELECT * FROM `article` WHERE `id` < 476373 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000637s ]
0.099654s