当前位置:首页>python>Python零基础入门:60分钟掌握核心语法与实战应用

Python零基础入门:60分钟掌握核心语法与实战应用

  • 2026-03-24 23:30:46
Python零基础入门:60分钟掌握核心语法与实战应用

Python零基础入门:60分钟掌握核心语法与实战应用

📚 学习目标

在60分钟内,您将学会:

  • Python基础语法和数据类型
  • 控制结构(条件语句、循环)
  • 函数定义和使用
  • 文件操作和模块导入
  • 3个实战项目:计算器、文件管理器、简单爬虫

⏰ 时间安排

  • 0-15分钟:基础语法(变量、数据类型、运算符)

  • 15-30分钟:控制结构(if语句、for/while循环)

  • 30-40分钟:函数和模块

  • 40-60分钟:实战项目


第一部分:基础语法(0-15分钟)

1.1 Python简介

Python是一种简单易学的编程语言,语法清晰,功能强大。

1.2 变量和数据类型

变量定义

# 变量不需要声明类型,直接赋值name = "张三"# 字符串age = 25# 整数height = 1.75# 浮点数is_student = True# 布尔值

基本数据类型

# 1. 数字类型integer_num = 42# 整数float_num = 3.14# 浮点数complex_num = 3 + 4j# 复数# 2. 字符串text = "Hello, Python!"multiline_text = """这是一个多行字符串"""# 3. 布尔值is_true = Trueis_false = False# 4. 列表(可变)fruits = ["苹果""香蕉""橙子"]numbers = [12345]# 5. 元组(不可变)coordinates = (1020)colors = ("红""绿""蓝")# 6. 字典person = {"姓名""李四","年龄"30,"城市""北京"}# 7. 集合unique_numbers = {12345}

类型检查和转换

# 检查类型print(type(name))      # <class 'str'>print(type(age))       # <class 'int'># 类型转换str_num = "123"int_num = int(str_num)     # 字符串转整数float_num = float(str_num) # 字符串转浮点数str_age = str(age)         # 整数转字符串

1.3 运算符

算术运算符

a = 10b = 3print(a + b)    # 加法:13print(a - b)    # 减法:7print(a * b)    # 乘法:30print(a / b)    # 除法:3.333...print(a // b)   # 整除:3print(a % b)    # 取余:1print(a ** b)   # 幂运算:1000

比较运算符

x = 5y = 10print(x == y)   # 等于:Falseprint(x != y)   # 不等于:Trueprint(x < y)    # 小于:Trueprint(x > y)    # 大于:Falseprint(x <= y)   # 小于等于:Trueprint(x >= y)   # 大于等于:False

逻辑运算符

p = Trueq = Falseprint(p and q)  # 与:Falseprint(p or q)   # 或:Trueprint(not p)    # 非:False

1.4 字符串操作

text = "Python编程"# 字符串长度print(len(text))        # 8# 字符串拼接greeting = "Hello, " + "World!"formatted = f"我的名字是{name},今年{age}岁"# 字符串方法print(text.upper())     # 转大写print(text.lower())     # 转小写print(text.replace("Python""Java"))  # 替换# 字符串切片print(text[0])          # 第一个字符:Pprint(text[0:6])        # 前6个字符:Pythonprint(text[-2:])        # 最后2个字符:编程

第二部分:控制结构(15-30分钟)

2.1 条件语句

if语句基础

score = 85if score >= 90:print("优秀")elif score >= 80:print("良好")elif score >= 60:print("及格")else:print("不及格")

条件表达式(三元运算符)

age = 18status = "成年人"if age >= 18else"未成年人"print(status)

复合条件

username = "admin"password = "123456"if username == "admin"and password == "123456":print("登录成功")else:print("用户名或密码错误")

2.2 循环语句

for循环

# 遍历列表fruits = ["苹果""香蕉""橙子"]for fruit in fruits:print(f"我喜欢吃{fruit}")# 遍历范围for i inrange(5):          # 0到4print(f"第{i+1}次循环")for i inrange(16):       # 1到5print(i)for i inrange(0102):   # 0到9,步长为2print(i)                # 输出:0, 2, 4, 6, 8# 遍历字典person = {"姓名""王五""年龄"28"职业""程序员"}for key, value in person.items():print(f"{key}{value}")

while循环

# 基础while循环count = 0while count < 5:print(f"计数:{count}")    count += 1# 用户输入循环whileTrue:    user_input = input("请输入命令(输入'quit'退出):")if user_input == "quit":breakprint(f"您输入了:{user_input}")

循环控制

# break:跳出循环for i inrange(10):if i == 5:breakprint(i)        # 输出:0, 1, 2, 3, 4# continue:跳过当前迭代for i inrange(10):if i % 2 == 0:  # 跳过偶数continueprint(i)        # 输出:1, 3, 5, 7, 9

2.3 列表推导式

# 传统方法squares = []for i inrange(10):    squares.append(i ** 2)# 列表推导式(更简洁)squares = [i ** 2for i inrange(10)]# 带条件的列表推导式even_squares = [i ** 2for i inrange(10if i % 2 == 0]print(even_squares)  # [0, 4, 16, 36, 64]

第三部分:函数和模块(30-40分钟)

3.1 函数定义和调用

基础函数

defgreet(name):"""问候函数"""returnf"你好,{name}!"# 调用函数message = greet("小明")print(message)

参数类型

# 默认参数defintroduce(name, age=18, city="北京"):returnf"我叫{name},今年{age}岁,来自{city}"print(introduce("张三"))                    # 使用默认值print(introduce("李四"25))                # 部分使用默认值print(introduce("王五"30"上海"))         # 全部指定# 可变参数defcalculate_sum(*numbers):"""计算任意数量数字的和"""returnsum(numbers)print(calculate_sum(123))           # 6print(calculate_sum(12345))     # 15# 关键字参数defcreate_profile(**kwargs):"""创建用户档案"""    profile = {}for key, value in kwargs.items():        profile[key] = valuereturn profileuser = create_profile(name="赵六", age=22, hobby="编程")print(user)

返回值

defdivide(a, b):"""除法运算,返回商和余数"""if b == 0:returnNone"除数不能为零"return a // b, a % bquotient, remainder = divide(103)print(f"商:{quotient},余数:{remainder}")

3.2 作用域和闭包

# 全局变量和局部变量global_var = "我是全局变量"deftest_scope():    local_var = "我是局部变量"print(global_var)   # 可以访问全局变量print(local_var)    # 可以访问局部变量test_scope()# print(local_var)    # 错误:无法访问局部变量# 闭包defouter_function(x):definner_function(y):return x + yreturn inner_functionadd_10 = outer_function(10)print(add_10(5))    # 15

3.3 模块和包

导入模块

# 导入整个模块import mathprint(math.pi)          # 3.141592653589793print(math.sqrt(16))    # 4.0# 导入特定函数from math import pi, sqrtprint(pi)print(sqrt(25))# 导入并重命名import datetime as dtnow = dt.datetime.now()print(now)# 导入所有(不推荐)from math import *

常用内置模块

# random模块import randomprint(random.randint(110))        # 随机整数print(random.choice(["A""B""C"]))  # 随机选择# datetime模块from datetime import datetime, timedeltanow = datetime.now()tomorrow = now + timedelta(days=1)print(f"现在:{now}")print(f"明天:{tomorrow}")# os模块import osprint(os.getcwd())          # 当前工作目录# os.mkdir("新文件夹")       # 创建文件夹

第四部分:实战项目(40-60分钟)

项目1:简单计算器(10分钟)

defcalculator():"""简单计算器"""print("=== 简单计算器 ===")print("支持的操作:+, -, *, /, quit")whileTrue:try:            operation = input("请输入操作(如:5 + 3)或输入'quit'退出:")if operation.lower() == 'quit':print("再见!")break# 解析输入            parts = operation.split()iflen(parts) != 3:print("格式错误,请使用:数字 运算符 数字")continue            num1 = float(parts[0])            operator = parts[1]            num2 = float(parts[2])# 计算结果if operator == '+':                result = num1 + num2elif operator == '-':                result = num1 - num2elif operator == '*':                result = num1 * num2elif operator == '/':if num2 == 0:print("错误:除数不能为零")continue                result = num1 / num2else:print("不支持的运算符")continueprint(f"结果:{num1}{operator}{num2} = {result}")except ValueError:print("输入错误,请输入有效的数字")except Exception as e:print(f"发生错误:{e}")# 运行计算器# calculator()

项目2:文件管理器(10分钟)

import osfrom datetime import datetimedeffile_manager():"""简单文件管理器"""print("=== 文件管理器 ===")whileTrue:print("\n可用命令:")print("1. ls - 列出当前目录文件")print("2. cd <目录名> - 切换目录")print("3. mkdir <目录名> - 创建目录")print("4. create <文件名> - 创建文件")print("5. read <文件名> - 读取文件")print("6. write <文件名> - 写入文件")print("7. pwd - 显示当前路径")print("8. quit - 退出")        command = input("\n请输入命令:").strip().split()ifnot command:continue        cmd = command[0].lower()try:if cmd == 'quit':print("再见!")breakelif cmd == 'ls':                list_directory()elif cmd == 'cd'andlen(command) > 1:                change_directory(command[1])elif cmd == 'mkdir'andlen(command) > 1:                create_directory(command[1])elif cmd == 'create'andlen(command) > 1:                create_file(command[1])elif cmd == 'read'andlen(command) > 1:                read_file(command[1])elif cmd == 'write'andlen(command) > 1:                write_file(command[1])elif cmd == 'pwd':print(f"当前路径:{os.getcwd()}")else:print("无效命令或缺少参数")except Exception as e:print(f"错误:{e}")deflist_directory():"""列出当前目录内容"""    items = os.listdir('.')ifnot items:print("目录为空")returnprint("\n目录内容:")for item insorted(items):if os.path.isdir(item):print(f"📁 {item}/")else:            size = os.path.getsize(item)print(f"📄 {item} ({size} bytes)")defchange_directory(path):"""切换目录"""    os.chdir(path)print(f"已切换到:{os.getcwd()}")defcreate_directory(name):"""创建目录"""    os.makedirs(name, exist_ok=True)print(f"目录 '{name}' 创建成功")defcreate_file(filename):"""创建文件"""withopen(filename, 'w', encoding='utf-8'as f:        f.write(f"# 文件创建于 {datetime.now()}\n")print(f"文件 '{filename}' 创建成功")defread_file(filename):"""读取文件"""withopen(filename, 'r', encoding='utf-8'as f:        content = f.read()print(f"\n--- {filename} 内容 ---")print(content)print("--- 文件结束 ---")defwrite_file(filename):"""写入文件"""print("请输入文件内容(输入'EOF'结束):")    lines = []whileTrue:        line = input()if line == 'EOF':break        lines.append(line)withopen(filename, 'w', encoding='utf-8'as f:        f.write('\n'.join(lines))print(f"内容已写入 '{filename}'")# 运行文件管理器# file_manager()

项目3:简单网页信息提取器(10分钟)

import urllib.requestimport refrom urllib.parse import urljoin, urlparsedefsimple_web_scraper():"""简单网页信息提取器"""print("=== 简单网页信息提取器 ===")whileTrue:print("\n功能选项:")print("1. 提取网页标题")print("2. 提取所有链接")print("3. 提取图片链接")print("4. 统计词频")print("5. quit - 退出")        choice = input("请选择功能(1-5):").strip()if choice == '5'or choice.lower() == 'quit':print("再见!")breakif choice in ['1''2''3''4']:            url = input("请输入网页URL:").strip()ifnot url.startswith(('http://''https://')):                url = 'https://' + urltry:                html_content = fetch_webpage(url)if choice == '1':                    extract_title(html_content)elif choice == '2':                    extract_links(html_content, url)elif choice == '3':                    extract_images(html_content, url)elif choice == '4':                    count_words(html_content)except Exception as e:print(f"错误:{e}")else:print("无效选择")deffetch_webpage(url):"""获取网页内容"""    headers = {'User-Agent''Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'    }    request = urllib.request.Request(url, headers=headers)with urllib.request.urlopen(request, timeout=10as response:        content = response.read().decode('utf-8', errors='ignore')return contentdefextract_title(html):"""提取网页标题"""    title_match = re.search(r'<title>(.*?)</title>', html, re.IGNORECASE | re.DOTALL)if title_match:        title = title_match.group(1).strip()print(f"网页标题:{title}")else:print("未找到网页标题")defextract_links(html, base_url):"""提取所有链接"""    link_pattern = r'<a[^>]+href=["\']([^"\']+)["\'][^>]*>(.*?)</a>'    links = re.findall(link_pattern, html, re.IGNORECASE | re.DOTALL)if links:print(f"\n找到 {len(links)} 个链接:")for i, (url, text) inenumerate(links[:10], 1):  # 只显示前10个# 处理相对链接            full_url = urljoin(base_url, url)            text = re.sub(r'<[^>]+>''', text).strip()  # 移除HTML标签print(f"{i}{text[:50]}... -> {full_url}")iflen(links) > 10:print(f"... 还有 {len(links) - 10} 个链接")else:print("未找到链接")defextract_images(html, base_url):"""提取图片链接"""    img_pattern = r'<img[^>]+src=["\']([^"\']+)["\'][^>]*>'    images = re.findall(img_pattern, html, re.IGNORECASE)if images:print(f"\n找到 {len(images)} 个图片:")for i, img_url inenumerate(images[:10], 1):  # 只显示前10个            full_url = urljoin(base_url, img_url)print(f"{i}{full_url}")iflen(images) > 10:print(f"... 还有 {len(images) - 10} 个图片")else:print("未找到图片")defcount_words(html):"""统计词频"""# 移除HTML标签    text = re.sub(r'<[^>]+>'' ', html)# 移除特殊字符,只保留字母和数字    text = re.sub(r'[^\w\s]'' ', text)# 转换为小写并分割单词    words = text.lower().split()# 统计词频    word_count = {}for word in words:iflen(word) > 2:  # 只统计长度大于2的单词            word_count[word] = word_count.get(word, 0) + 1# 排序并显示前10个高频词if word_count:        sorted_words = sorted(word_count.items(), key=lambda x: x[1], reverse=True)print(f"\n词频统计(前10个):")for i, (word, count) inenumerate(sorted_words[:10], 1):print(f"{i}{word}{count}次")else:print("未找到有效单词")# 运行网页信息提取器# simple_web_scraper()

🎯 学习总结

核心概念回顾

  1. 变量和数据类型:字符串、数字、列表、字典等

  2. 控制结构:if/elif/else、for/while循环

  3. 函数:定义、参数、返回值、作用域

  4. 模块:导入和使用标准库

  5. 异常处理:try/except语句

最佳实践

  1. 代码风格:使用有意义的变量名,添加注释

  2. 错误处理:使用try/except处理可能的错误

  3. 函数设计:保持函数简单,单一职责

  4. 代码复用:将重复的代码封装成函数

下一步学习建议

  1. 面向对象编程:类和对象

  2. 文件和数据处理:CSV、JSON、数据库

  3. 网络编程:requests库、API调用

  4. 数据科学:pandas、numpy、matplotlib

  5. Web开发:Flask、Django框架

练习建议

  1. 每天编写小程序练习语法
  2. 阅读其他人的代码学习技巧
  3. 参与开源项目贡献代码
  4. 解决实际问题,如数据处理、自动化任务

📝 快速参考

常用语法速查

# 变量赋值name = "值"# 条件语句if condition:# 代码块elif other_condition:# 代码块else:# 代码块# 循环for item in iterable:# 代码块while condition:# 代码块# 函数定义deffunction_name(parameters):# 代码块return value# 异常处理try:# 可能出错的代码except Exception as e:# 错误处理

常用内置函数

len()       # 获取长度type()      # 获取类型str()       # 转换为字符串int()       # 转换为整数float()     # 转换为浮点数list()      # 转换为列表dict()      # 转换为字典range()     # 生成数字序列enumerate() # 枚举索引和值zip()       # 并行迭代

恭喜您完成了Python零基础入门教程!现在您已经掌握了Python的核心语法和基本应用。继续练习和探索,您将成为一名优秀的Python程序员!🐍✨

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 11:29:47 HTTP/2.0 GET : https://f.mffb.com.cn/a/479079.html
  2. 运行时间 : 0.098712s [ 吞吐率:10.13req/s ] 内存消耗:4,736.90kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=6cb7eb060267dee92c3779d01b7200b5
  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.000458s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000827s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000337s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000251s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000505s ]
  6. SELECT * FROM `set` [ RunTime:0.000220s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000584s ]
  8. SELECT * FROM `article` WHERE `id` = 479079 LIMIT 1 [ RunTime:0.001088s ]
  9. UPDATE `article` SET `lasttime` = 1774582187 WHERE `id` = 479079 [ RunTime:0.006619s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000373s ]
  11. SELECT * FROM `article` WHERE `id` < 479079 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000622s ]
  12. SELECT * FROM `article` WHERE `id` > 479079 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000420s ]
  13. SELECT * FROM `article` WHERE `id` < 479079 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001099s ]
  14. SELECT * FROM `article` WHERE `id` < 479079 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002662s ]
  15. SELECT * FROM `article` WHERE `id` < 479079 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.006791s ]
0.101134s