当前位置:首页>python>Python完整教程:从入门到进阶

Python完整教程:从入门到进阶

  • 2026-08-18 23:11:12
Python完整教程:从入门到进阶

目录

  1. 环境搭建
  2. 基础语法
  3. 数据类型
  4. 运算符
  5. 条件判断
  6. 循环结构
  7. 函数
  8. 列表、元组、字典、集合
  9. 字符串操作
  10. 文件操作
  11. 异常处理
  12. 模块与包
  13. 面向对象编程
  14. 迭代器与生成器
  15. 装饰器
  16. 正则表达式
  17. 多线程与多进程
  18. 网络编程
  19. 数据库操作
  20. 实战项目

第一章:环境搭建

1.1 安装Python

  1. 访问 https://python.org
  2. 下载Python 3.x版本
  3. 安装时勾选"Add Python to PATH"
  4. 验证安装:打开终端输入 python --version

1.2 开发工具推荐

  • VS Code:轻量级,插件丰富
  • PyCharm:专业Python IDE
  • Jupyter Notebook:适合数据分析和学习
  • IDLE:Python自带,适合初学者

1.3 第一个程序

print("Hello, World!")

第二章:基础语法

2.1 注释

# 这是单行注释"""这是多行注释可以写多行"""

2.2 变量

name = "小明"# 字符串age = 12# 整数height = 1.65# 浮点数is_student = True# 布尔值

2.3 输入输出

# 输入name = input("请输入你的名字:")age = int(input("请输入你的年龄:"))# 输出print("你好," + name + "!")print(f"你今年{age}岁了")  # f-string格式化

2.4 命名规则

  • 只能包含字母、数字、下划线
  • 不能以数字开头
  • 区分大小写
  • 不能使用Python关键字

第三章:数据类型

3.1 数字类型

# 整数a = 100b = -50# 浮点数pi = 3.14159c = 2.5e10# 科学计数法# 复数d = 3 + 4j

3.2 布尔类型

x = Truey = False# 布尔运算print(3 > 2)   # Trueprint(3 < 2)   # Falseprint(3 == 3)  # Trueprint(3 != 3)  # False

3.3 类型转换

# int() 转整数a = int("123")    # 123b = int(3.14)     # 3# float() 转浮点数c = float("3.14")  # 3.14d = float(100)     # 100.0# str() 转字符串e = str(123)       # "123"f = str(3.14)      # "3.14"# bool() 转布尔print(bool(1))     # Trueprint(bool(0))     # Falseprint(bool(""))    # False

3.4 类型检查

x = 100print(type(x))  # <class 'int'>

第四章:运算符

4.1 算术运算符

a = 10b = 3print(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  幂运算

4.2 比较运算符

x = 10y = 20print(x > y)    # Falseprint(x < y)    # Trueprint(x >= 10)  # Trueprint(x <= 10)  # Trueprint(x == y)   # Falseprint(x != y)   # True

4.3 逻辑运算符

x = Truey = Falseprint(x and y)  # Falseprint(x or y)   # Trueprint(not x)    # False

4.4 赋值运算符

a = 10a += 5# a = a + 5 = 15a -= 3# a = a - 3 = 12a *= 2# a = a * 2 = 24a /= 4# a = a / 4 = 6.0a //= 2# a = a // 2 = 3.0a %= 2# a = a % 2 = 1.0

第五章:条件判断

5.1 if语句

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

5.2 嵌套if

age = 25has_id = Trueif age >= 18:if has_id:        print("可以进入")else:        print("请出示身份证")else:    print("未成年不能进入")

5.3 三元表达式

x = 10result = "正数"if x > 0else"非正数"print(result)  # 正数

5.4 match-case(Python 3.10+)

command = "start"match command:    case "start":        print("启动程序")    case "stop":        print("停止程序")    case _:        print("未知命令")

第六章:循环结构

6.1 for循环

# 遍历列表fruits = ["苹果""香蕉""橘子"]for fruit in fruits:    print(fruit)# 使用range()for i in range(16):    print(i)  # 1 2 3 4 5# 带步长的rangefor i in range(0102):    print(i)  # 0 2 4 6 8

6.2 while循环

count = 1while count <= 5:    print(count)    count += 1

6.3 break和continue

# break 跳出循环for i in range(111):if i == 5:break    print(i)  # 1 2 3 4# continue 跳过当前循环for i in range(111):if i % 2 == 0:continue    print(i)  # 1 3 5 7 9

6.4 循环与else

for i in range(5):if i == 10:breakelse:    print("循环正常结束")  # 会执行,因为没有break

第七章:函数

7.1 函数定义与调用

defgreet(name):    print(f"你好,{name}!")greet("小明")  # 你好,小明!

7.2 返回值

defadd(a, b):return a + bresult = add(35)print(result)  # 8

7.3 默认参数

defgreet(name, greeting="你好"):    print(f"{greeting}{name}!")greet("小明")              # 你好,小明!greet("小明""早上好")    # 早上好,小明!

7.4 可变参数

# *args 接收任意数量的位置参数defadd_all(*numbers):return sum(numbers)print(add_all(1234))  # 10# **kwargs 接收任意数量的关键字参数defprint_info(**info):for key, value in info.items():        print(f"{key}{value}")print_info(name="小明", age=12)

7.5 Lambda函数

add = lambda a, b: a + bprint(add(35))  # 8# 常用于排序students = [("小明"85), ("小红"92), ("小刚"78)]students.sort(key=lambda x: x[1], reverse=True)print(students)  # [('小红', 92), ('小明', 85), ('小刚', 78)]

7.6 作用域

x = 10# 全局变量deffunc():    x = 20# 局部变量    print(x)  # 20func()print(x)  # 10# 使用global修改全局变量deffunc2():global x    x = 30func2()print(x)  # 30

第八章:数据结构

8.1 列表(List)

# 创建列表fruits = ["苹果""香蕉""橘子"]numbers = [12345]# 访问元素print(fruits[0])    # 苹果print(fruits[-1])   # 橘子# 切片print(numbers[1:3])  # [2, 3]print(numbers[:3])   # [1, 2, 3]print(numbers[2:])   # [3, 4, 5]# 常用方法fruits.append("葡萄")      # 添加元素fruits.insert(1"西瓜")   # 插入元素fruits.remove("香蕉")      # 删除元素fruits.pop()               # 删除最后一个fruits.sort()              # 排序fruits.reverse()           # 反转fruits.index("苹果")       # 查找索引fruits.count("苹果")       # 统计个数len(fruits)                # 长度

8.2 元组(Tuple)

# 创建元组colors = ("红""绿""蓝")# 访问元素print(colors[0])  # 红# 元组不可修改# colors[0] = "黄"  # 报错# 解包a, b, c = colorsprint(a, b, c)  # 红 绿 蓝

8.3 字典(Dictionary)

# 创建字典student = {"name""小明","age"12,"score"85}# 访问元素print(student["name"])        # 小明print(student.get("age"))     # 12# 修改/添加元素student["age"] = 13student["gender"] = "男"# 删除元素del student["score"]student.pop("gender")# 遍历字典for key, value in student.items():    print(f"{key}{value}")# 获取所有键/值print(student.keys())print(student.values())

8.4 集合(Set)

# 创建集合fruits = {"苹果""香蕉""橘子"}# 添加元素fruits.add("葡萄")# 删除元素fruits.remove("香蕉")# 集合运算set1 = {123}set2 = {234}print(set1 | set2)  # 并集 {1, 2, 3, 4}print(set1 & set2)  # 交集 {2, 3}print(set1 - set2)  # 差集 {1}

第九章:字符串操作

9.1 字符串基础

s = "Hello, World!"print(len(s))        # 13print(s[0])          # Hprint(s[-1])         # !print(s[0:5])        # Hello

9.2 常用方法

s = "  Hello, World!  "print(s.strip())          # "Hello, World!"  去除空格print(s.lower())          # "  hello, world!  "  转小写print(s.upper())          # "  HELLO, WORLD!  "  转大写print(s.replace("H""J"))  # "  Jello, World!  "  替换print(s.split(","))       # ['  Hello', ' World!  ']  分割print(s.find("World"))    # 9  查找位置print(s.count("l"))       # 3  统计个数

9.3 字符串格式化

name = "小明"age = 12# 方法1:f-string(推荐)print(f"我叫{name},今年{age}岁")# 方法2:formatprint("我叫{},今年{}岁".format(name, age))# 方法3:%格式化print("我叫%s,今年%d岁" % (name, age))

9.4 字符串判断

s = "Hello123"print(s.isalpha())    # False  是否全是字母print(s.isdigit())    # False  是否全是数字print(s.isalnum())    # True   是否全是字母或数字print(s.isspace())    # False  是否全是空格

第十章:文件操作

10.1 读写文件

# 写入文件with open("test.txt""w", encoding="utf-8"as f:    f.write("Hello, World!\n")    f.write("第二行\n")# 读取文件with open("test.txt""r", encoding="utf-8"as f:    content = f.read()    print(content)

10.2 文件模式

# "r"  只读(默认)# "w"  写入(覆盖)# "a"  追加# "r+" 读写# "wb" 二进制写入# "rb" 二进制读取

10.3 逐行读取

with open("test.txt""r", encoding="utf-8"as f:for line in f:        print(line.strip())

10.4 读取到列表

with open("test.txt""r", encoding="utf-8"as f:    lines = f.readlines()    print(lines)

10.5 文件操作实战:成绩管理

# 写入成绩defsave_scores(scores):with open("scores.txt""w", encoding="utf-8"as f:for name, score in scores.items():            f.write(f"{name},{score}\n")# 读取成绩defload_scores():    scores = {}with open("scores.txt""r", encoding="utf-8"as f:for line in f:            name, score = line.strip().split(",")            scores[name] = int(score)return scores# 使用scores = {"小明"85"小红"92"小刚"78}save_scores(scores)loaded_scores = load_scores()print(loaded_scores)

第十一章:异常处理

11.1 try-except

try:    num = int(input("请输入数字:"))    result = 10 / num    print(f"结果:{result}")except ValueError:    print("输入的不是数字")except ZeroDivisionError:    print("不能除以零")except Exception as e:    print(f"发生错误:{e}")

11.2 try-except-else-finally

try:    num = int(input("请输入数字:"))    result = 10 / numexcept ValueError:    print("输入的不是数字")except ZeroDivisionError:    print("不能除以零")else:    print(f"结果:{result}")  # 没有异常时执行finally:    print("程序结束")  # 无论如何都执行

11.3 自定义异常

classAgeError(Exception):def__init__(self, message="年龄必须在0-150之间"):        self.message = message        super().__init__(self.message)defcheck_age(age):if age < 0or age > 150:raise AgeError()    print(f"年龄:{age}")try:    check_age(200)except AgeError as e:    print(e)  # 年龄必须在0-150之间

第十二章:模块与包

12.1 导入模块

# 导入整个模块import mathprint(math.pi)# 导入特定函数from math import sqrtprint(sqrt(16))# 导入并起别名import numpy as np# 导入所有(不推荐)from math import *

12.2 常用内置模块

import os          # 操作系统相关import sys         # 系统相关import datetime    # 日期时间import json        # JSON处理import re          # 正则表达式import random      # 随机数import math        # 数学函数

12.3 自定义模块

# mymodule.pydefadd(a, b):return a + bdefsubtract(a, b):return a - bPI = 3.14159
# main.pyimport mymoduleprint(mymodule.add(35))print(mymodule.PI)

12.4 包

mypackage/├── __init__.py├── module1.py└── module2.py
from mypackage import module1from mypackage.module2 import func

第十三章:面向对象编程

13.1 类与对象

classDog:def__init__(self, name, age):        self.name = name        self.age = agedefbark(self):        print(f"{self.name}在汪汪叫")definfo(self):        print(f"名字:{self.name},年龄:{self.age}岁")# 创建对象dog1 = Dog("旺财"3)dog1.bark()    # 旺财在汪汪叫dog1.info()    # 名字:旺财,年龄:3岁

13.2 继承

classAnimal:def__init__(self, name):        self.name = namedefspeak(self):passclassDog(Animal):defspeak(self):returnf"{self.name}:汪汪汪!"classCat(Animal):defspeak(self):returnf"{self.name}:喵喵喵!"dog = Dog("旺财")cat = Cat("咪咪")print(dog.speak())  # 旺财:汪汪汪!print(cat.speak())  # 咪咪:喵喵喵!

13.3 多态

defanimal_sound(animal):    print(animal.speak())animal_sound(Dog("旺财"))animal_sound(Cat("咪咪"))

13.4 属性装饰器

classCircle:def__init__(self, radius):        self._radius = radius    @propertydefradius(self):return self._radius    @radius.setterdefradius(self, value):if value < 0:raise ValueError("半径不能为负")        self._radius = value    @propertydefarea(self):return3.14 * self._radius ** 2c = Circle(5)print(c.area)      # 78.5c.radius = 10print(c.area)      # 314.0

13.5 特殊方法

classVector:def__init__(self, x, y):        self.x = x        self.y = ydef__str__(self):returnf"Vector({self.x}{self.y})"def__add__(self, other):return Vector(self.x + other.x, self.y + other.y)def__len__(self):return int((self.x**2 + self.y**2)**0.5)v1 = Vector(34)v2 = Vector(12)print(v1)          # Vector(3, 4)print(v1 + v2)     # Vector(4, 6)print(len(v1))     # 5

第十四章:迭代器与生成器

14.1 迭代器

nums = [123]it = iter(nums)print(next(it))  # 1print(next(it))  # 2print(next(it))  # 3

14.2 生成器

defcountdown(n):while n > 0:yield n        n -= 1for i in countdown(5):    print(i)  # 5 4 3 2 1

14.3 生成器表达式

# 列表推导式(占用内存)squares_list = [x**2for x in range(1000000)]# 生成器表达式(节省内存)squares_gen = (x**2for x in range(1000000))print(next(squares_gen))  # 0print(next(squares_gen))  # 1

14.4 实战:读取大文件

defread_large_file(file_path):with open(file_path, 'r'as f:for line in f:yield line.strip()# 不会一次性加载整个文件到内存for line in read_large_file("large_file.txt"):    process(line)

第十五章:装饰器

15.1 函数装饰器

deftimer(func):import timedefwrapper(*args, **kwargs):        start = time.time()        result = func(*args, **kwargs)        end = time.time()        print(f"{func.__name__} 执行时间:{end - start:.2f}秒")return resultreturn wrapper@timerdefslow_function():import time    time.sleep(1)    print("函数执行完毕")slow_function()

15.2 带参数的装饰器

defrepeat(times):defdecorator(func):defwrapper(*args, **kwargs):for _ in range(times):                result = func(*args, **kwargs)return resultreturn wrapperreturn decorator@repeat(times=3)defgreet(name):    print(f"你好,{name}!")greet("小明")

15.3 类装饰器

classTimer:def__init__(self, func):        self.func = funcdef__call__(self, *args, **kwargs):import time        start = time.time()        result = self.func(*args, **kwargs)        end = time.time()        print(f"执行时间:{end - start:.2f}秒")return result@Timerdefslow_function():import time    time.sleep(1)slow_function()

第十六章:正则表达式

16.1 基础用法

import re# 查找text = "我的电话是13812345678,邮箱是test@example.com"phone = re.search(r'1[3-9]\d{9}', text)if phone:    print(f"找到电话:{phone.group()}")# 匹配所有emails = re.findall(r'[\w.]+@[\w.]+', text)print(emails)

16.2 常用模式

import re# 常用元字符# \d  数字# \w  字母数字下划线# \s  空白字符# .   任意字符# *   0次或多次# +   1次或多次# ?   0次或1次# {n} 恰好n次# {n,m} n到m次# ^   开始# $   结束# 示例text = "2024-01-15"date = re.match(r'(\d{4})-(\d{2})-(\d{2})', text)if date:    year, month, day = date.groups()    print(f"年:{year},月:{month},日:{day}")

16.3 替换与分割

import re# 替换text = "电话:138-1234-5678"cleaned = re.sub(r'-''', text)print(cleaned)  # 电话:13812345678# 分割text = "苹果,香蕉 橘子;葡萄"parts = re.split(r'[,;\s]+', text)print(parts)  # ['苹果', '香蕉', '橘子', '葡萄']

第十七章:多线程与多进程

17.1 多线程

import threadingimport timedefworker(name):    print(f"线程{name}开始")    time.sleep(1)    print(f"线程{name}结束")# 创建线程t1 = threading.Thread(target=worker, args=("A",))t2 = threading.Thread(target=worker, args=("B",))# 启动线程t1.start()t2.start()# 等待线程结束t1.join()t2.join()print("所有线程完成")

17.2 线程安全

import threadingcounter = 0lock = threading.Lock()defincrement():global counterfor _ in range(100000):        lock.acquire()        counter += 1        lock.release()threads = [threading.Thread(target=increment) for _ in range(5)]for t in threads:    t.start()for t in threads:    t.join()print(counter)  # 500000

17.3 多进程

from multiprocessing import Processimport osdefworker():    print(f"进程{os.getpid()}开始")if __name__ == "__main__":    processes = [Process(target=worker) for _ in range(3)]for p in processes:        p.start()for p in processes:        p.join()

第十八章:网络编程

18.1 TCP客户端

import socketclient = socket.socket(socket.AF_INET, socket.SOCK_STREAM)client.connect(("www.example.com"80))client.send(b"GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n")response = client.recv(1024)print(response.decode())client.close()

18.2 TCP服务器

import socketserver = socket.socket(socket.AF_INET, socket.SOCK_STREAM)server.bind(("0.0.0.0"8888))server.listen(5)print("服务器启动,等待连接...")whileTrue:    client, addr = server.accept()    print(f"连接来自:{addr}")    data = client.recv(1024)    client.send(data)    client.close()

18.3 HTTP请求

import requests# GET请求response = requests.get("https://api.github.com")print(response.json())# POST请求data = {"username""test""password""123456"}response = requests.post("https://httpbin.org/post", data=data)print(response.json())

第十九章:数据库操作

19.1 SQLite

import sqlite3# 连接数据库conn = sqlite3.connect("test.db")cursor = conn.cursor()# 创建表cursor.execute("""CREATE TABLE IF NOT EXISTS users (    id INTEGER PRIMARY KEY,    name TEXT,    age INTEGER)""")# 插入数据cursor.execute("INSERT INTO users (name, age) VALUES (?, ?)", ("小明"12))conn.commit()# 查询数据cursor.execute("SELECT * FROM users")users = cursor.fetchall()for user in users:    print(user)# 关闭连接conn.close()

19.2 MySQL

import pymysql# 连接数据库conn = pymysql.connect(    host="localhost",    user="root",    password="password",    database="test")cursor = conn.cursor()# 执行SQLcursor.execute("SELECT * FROM users")users = cursor.fetchall()for user in users:    print(user)conn.close()

19.3 ORM:SQLAlchemy

from sqlalchemy import create_engine, Column, Integer, Stringfrom sqlalchemy.ext.declarative import declarative_basefrom sqlalchemy.orm import sessionmakerBase = declarative_base()classUser(Base):    __tablename__ = 'users'    id = Column(Integer, primary_key=True)    name = Column(String)    age = Column(Integer)engine = create_engine('sqlite:///test.db')Base.metadata.create_all(engine)Session = sessionmaker(bind=engine)session = Session()# 添加用户new_user = User(name="小明", age=12)session.add(new_user)session.commit()# 查询用户users = session.query(User).all()for user in users:    print(user.name, user.age)

第二十章:实战项目

20.1 待办事项管理

import jsonTODO_FILE = "todos.json"defload_todos():try:with open(TODO_FILE, 'r'as f:return json.load(f)except FileNotFoundError:return []defsave_todos(todos):with open(TODO_FILE, 'w'as f:        json.dump(todos, f, ensure_ascii=False, indent=2)defadd_todo(title):    todos = load_todos()    todos.append({"title": title, "done"False})    save_todos(todos)    print(f"已添加:{title}")defcomplete_todo(index):    todos = load_todos()if0 <= index < len(todos):        todos[index]["done"] = True        save_todos(todos)        print(f"已完成:{todos[index]['title']}")defshow_todos():    todos = load_todos()ifnot todos:        print("暂无待办事项")returnfor i, todo in enumerate(todos):        status = "✓"if todo["done"else" "        print(f"{i}. [{status}{todo['title']}")defmain():whileTrue:        print("\n1. 添加待办")        print("2. 完成待办")        print("3. 查看待办")        print("4. 退出")        choice = input("请选择:")if choice == "1":            title = input("输入待办内容:")            add_todo(title)elif choice == "2":            index = int(input("输入待办编号:"))            complete_todo(index)elif choice == "3":            show_todos()elif choice == "4":breakif __name__ == "__main__":    main()

20.2 简易计算器

defcalculator():whileTrue:        print("\n1. 加法")        print("2. 减法")        print("3. 乘法")        print("4. 除法")        print("5. 退出")        choice = input("请选择运算:")if choice == "5":breakif choice in ("1""2""3""4"):            a = float(input("输入第一个数:"))            b = float(input("输入第二个数:"))if choice == "1":                print(f"结果:{a + b}")elif choice == "2":                print(f"结果:{a - b}")elif choice == "3":                print(f"结果:{a * b}")elif choice == "4":if b != 0:                    print(f"结果:{a / b}")else:                    print("错误:除数不能为0")else:            print("无效选择")if __name__ == "__main__":    calculator()

20.3 批量文件重命名

import osdefbatch_rename(folder_path, old_str, new_str):for filename in os.listdir(folder_path):if old_str in filename:            new_filename = filename.replace(old_str, new_str)            old_path = os.path.join(folder_path, filename)            new_path = os.path.join(folder_path, new_filename)            os.rename(old_path, new_path)            print(f"重命名:{filename} -> {new_filename}")# 使用示例# batch_rename("D:/photos", "IMG_", "照片_")

20.4 简易爬虫

import requestsfrom bs4 import BeautifulSoupdefscrape_title(url):    response = requests.get(url)    soup = BeautifulSoup(response.text, 'html.parser')return soup.title.stringdefscrape_links(url):    response = requests.get(url)    soup = BeautifulSoup(response.text, 'html.parser')    links = []for link in soup.find_all('a', href=True):        links.append(link['href'])return links# 使用示例# title = scrape_title("https://www.example.com")# print(title)

20.5 数据可视化

import matplotlib.pyplot as plt# 折线图x = [12345]y = [246810]plt.plot(x, y, marker='o')plt.xlabel('X轴')plt.ylabel('Y轴')plt.title('折线图')plt.savefig('line_chart.png')plt.show()# 柱状图categories = ['A''B''C''D']values = [15304520]plt.bar(categories, values)plt.title('柱状图')plt.savefig('bar_chart.png')plt.show()# 饼图sizes = [30252025]labels = ['A''B''C''D']plt.pie(sizes, labels=labels, autopct='%1.1f%%')plt.title('饼图')plt.savefig('pie_chart.png')plt.show()

附录:Python常用内置函数

# 数学函数abs(-5)          # 5  绝对值max(123)     # 3  最大值min(123)     # 1  最小值sum([123])   # 6  求和round(3.141)   # 3.1 四舍五入# 序列函数len([123])   # 3  长度sorted([312])  # [1, 2, 3]  排序enumerate(['a''b'])  # [(0, 'a'), (1, 'b')]  枚举zip([12], ['a''b'])  # [(1, 'a'), (2, 'b')]  打包# 类型转换int("123")       # 123float("3.14")    # 3.14str(123)         # "123"list("abc")      # ['a', 'b', 'c']dict([("a"1), ("b"2)])  # {'a': 1, 'b': 2}# 其他type(123)        # <class 'int'>isinstance(123, int)  # Trueid([123])    # 对象唯一标识hash("hello")    # 哈希值

结语

恭喜你完成了Python完整教程的学习!这份教程涵盖了Python从入门到进阶的所有核心知识点。记住:

  1. 多动手实践 - 编程是实践性很强的技能
  2. 从小项目开始 - 积累实战经验
  3. 善用文档和社区 - Python官方文档是最好的学习资源
  4. 坚持学习 - 编程学习是一个持续的过程

祝你编程之路越走越远!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 17:46:41 HTTP/2.0 GET : https://f.mffb.com.cn/a/506349.html
  2. 运行时间 : 0.182332s [ 吞吐率:5.48req/s ] 内存消耗:4,767.55kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=7fa41629ab01067b3b7f49bd74464b28
  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.000798s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001290s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000663s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000666s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001252s ]
  6. SELECT * FROM `set` [ RunTime:0.000567s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001376s ]
  8. SELECT * FROM `article` WHERE `id` = 506349 LIMIT 1 [ RunTime:0.001178s ]
  9. UPDATE `article` SET `lasttime` = 1787305601 WHERE `id` = 506349 [ RunTime:0.003449s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000554s ]
  11. SELECT * FROM `article` WHERE `id` < 506349 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001204s ]
  12. SELECT * FROM `article` WHERE `id` > 506349 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.002457s ]
  13. SELECT * FROM `article` WHERE `id` < 506349 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003268s ]
  14. SELECT * FROM `article` WHERE `id` < 506349 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.003071s ]
  15. SELECT * FROM `article` WHERE `id` < 506349 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.001467s ]
0.185946s