当前位置:首页>python>Python小白工程师必会的指令

Python小白工程师必会的指令

  • 2026-06-27 13:33:30
Python小白工程师必会的指令

Python小白工程师必会的指令

零基础入门Python,掌握这些指令让你快速上手

欢迎大家关注此公众号,后台点击按钮【免费资料】可免费获取【Python入门30节课】电子书

  1. 此外小庄推荐一本适合于新手\小白入手一本 Python基础书籍,欢迎大家订阅,也感谢大家支持,我才有更新的动力

前言

作为Python小白,你可能刚刚开始学习编程。本文将为你整理Python最基础、最常用的指令,帮助你快速入门Python编程。这些指令是每个Python程序员都必须掌握的基础知识。


一、Python基础环境

1.1 安装Python

# 下载Python
# 访问 https://www.python.org/downloads/

# 验证安装
python --version
python -V

# 运行Python交互式解释器
python

# 退出Python交互式解释器
exit()
quit()
Ctrl + Z (Windows)
Ctrl + D (Linux/Mac)

1.2 运行Python脚本

# 运行Python文件
python script.py

# 运行Python代码
python -c "print('Hello, World!')"

1.3 安装第三方库

# 使用pip安装库
pip install requests
pip install numpy
pip install pandas

# 查看已安装的库
pip list

# 升级pip
pip install --upgrade pip

# 卸载库
pip uninstall requests

二、基本数据类型

2.1 数字类型

# 整数
x = 10
print(type(x))  # <class 'int'>

# 浮点数
y = 3.14
print(type(y))  # <class 'float'>

# 复数
z = 1 + 2j
print(type(z))  # <class 'complex'>

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

2.2 字符串类型

# 创建字符串
s1 = 'Hello'
s2 = "World"
s3 = '''多行
字符串'''


# 字符串操作
print(s1 + ' ' + s2)  # 拼接: Hello World
print(s1 * 3)          # 重复: HelloHelloHello

# 字符串方法
text = "  Hello, World!  "
print(text.strip())        # 去除空格: Hello, World!
print(text.lower())        # 转小写: hello, world!
print(text.upper())        # 转大写: HELLO, WORLD!
print(text.replace('Hello''Hi'))  # 替换: Hi, World!
print(text.split(','))     # 分割: ['  Hello', ' World!  ']
print(len(text))           # 长度: 18

# 字符串格式化
name = "Alice"
age = 25
print(f"我叫{name},今年{age}岁")  # f-string
print("我叫{},今年{}岁".format(name, age))  # format
print("我叫%s,今年%d岁" % (name, age))  # %

2.3 布尔类型

# 布尔值
a = True
b = False
print(type(a))  # <class 'bool'>

# 比较运算
print(10 > 5)    # True
print(10 < 5)    # False
print(10 == 10)  # True
print(10 != 5)   # True
print(10 >= 10)  # True
print(10 <= 5)   # False

# 逻辑运算
print(TrueandTrue)   # True
print(TrueandFalse)  # False
print(TrueorFalse)   # True
print(notTrue)        # False

2.4 None类型

# None表示空值
x = None
print(type(x))  # <class 'NoneType'>
print(x isNone)  # True

三、数据结构

3.1 列表(List)

# 创建列表
fruits = ['apple''banana''cherry']
numbers = [12345]
mixed = [1'hello'True3.14]

# 访问元素
print(fruits[0])      # apple
print(fruits[-1])     # cherry
print(fruits[1:3])    # ['banana', 'cherry']

# 修改元素
fruits[0] = 'avocado'

# 添加元素
fruits.append('orange')        # 末尾添加
fruits.insert(1'grape')     # 指定位置添加

# 删除元素
fruits.remove('banana')        # 删除指定元素
fruits.pop()                   # 删除末尾元素
del fruits[0]                  # 删除指定位置元素

# 列表操作
print(len(fruits))             # 长度
print(fruits.count('apple'))   # 计数
fruits.sort()                  # 排序
fruits.reverse()               # 反转
fruits.clear()                 # 清空

# 列表推导式
squares = [x**2for x inrange(10)]
print(squares)  # [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]

3.2 元组(Tuple)

# 创建元组
colors = ('red''green''blue')
point = (1020)

# 访问元素
print(colors[0])      # red
print(colors[-1])     # blue
print(colors[1:3])    # ('green', 'blue')

# 元组是不可变的
# colors[0] = 'yellow'  # 错误!

# 元组操作
print(len(colors))    # 长度
print(colors.count('red'))  # 计数
print(colors.index('green'))  # 索引

# 解包
x, y = point
print(x)  # 10
print(y)  # 20

3.3 字典(Dictionary)

# 创建字典
person = {
'name''Alice',
'age'25,
'city''Beijing'
}

# 访问元素
print(person['name'])          # Alice
print(person.get('email''未设置'))  # 未设置(默认值)

# 修改元素
person['age'] = 26

# 添加元素
person['email'] = 'alice@example.com'

# 删除元素
del person['city']
person.pop('email')

# 字典操作
print(len(person))             # 长度
print(person.keys())           # 所有键
print(person.values())         # 所有值
print(person.items())          # 所有键值对

# 遍历字典
for key, value in person.items():
print(f"{key}{value}")

# 字典推导式
squares = {x: x**2for x inrange(5)}
print(squares)  # {0: 0, 1: 1, 2: 4, 3: 9, 4: 16}

3.4 集合(Set)

# 创建集合
fruits = {'apple''banana''cherry'}
numbers = set([12345])

# 添加元素
fruits.add('orange')

# 删除元素
fruits.remove('banana')
fruits.discard('banana')  # 不会报错

# 集合操作
print(len(fruits))  # 长度

# 集合运算
set1 = {12345}
set2 = {45678}

print(set1 & set2)  # 交集: {4, 5}
print(set1 | set2)  # 并集: {1, 2, 3, 4, 5, 6, 7, 8}
print(set1 - set2)  # 差集: {1, 2, 3}
print(set1 ^ set2)  # 对称差集: {1, 2, 3, 6, 7, 8}

四、流程控制

4.1 条件语句

# if语句
age = 18
if age >= 18:
print("成年人")

# if-else语句
if age >= 18:
print("成年人")
else:
print("未成年人")

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

# 嵌套if
if age >= 18:
if age >= 60:
print("老年人")
else:
print("成年人")

4.2 循环语句

# for循环
for i inrange(5):
print(i)  # 0, 1, 2, 3, 4

for i inrange(1102):
print(i)  # 1, 3, 5, 7, 9

# 遍历列表
fruits = ['apple''banana''cherry']
for fruit in fruits:
print(fruit)

# 遍历字典
person = {'name''Alice''age'25}
for key, value in person.items():
print(f"{key}{value}")

# while循环
count = 0
while count < 5:
print(count)
    count += 1

# break和continue
for i inrange(10):
if i == 3:
break# 跳出循环
print(i)

for i inrange(10):
if i == 3:
continue# 跳过本次循环
print(i)

# 循环else
for i inrange(5):
print(i)
else:
print("循环正常结束")

4.3 列表推导式

# 基本列表推导式
squares = [x**2for x inrange(10)]
print(squares)

# 带条件的列表推导式
even_numbers = [x for x inrange(10if x % 2 == 0]
print(even_numbers)

# 嵌套列表推导式
matrix = [[123], [456], [789]]
flattened = [num for row in matrix for num in row]
print(flattened)

五、函数

5.1 定义函数

# 基本函数
defgreet(name):
"""问候函数"""
returnf"Hello, {name}!"

result = greet("Alice")
print(result)

# 多个返回值
defget_user_info():
return"Alice"25"Beijing"

name, age, city = get_user_info()

# 默认参数
defgreet(name, greeting="Hello"):
returnf"{greeting}{name}!"

print(greet("Alice"))
print(greet("Alice""Hi"))

# 可变参数
defsum_numbers(*args):
returnsum(args)

print(sum_numbers(12345))

# 关键字参数
defprint_info(**kwargs):
for key, value in kwargs.items():
print(f"{key}{value}")

print_info(name="Alice", age=25, city="Beijing")

5.2 Lambda函数

# Lambda函数
square = lambda x: x**2
print(square(5))  # 25

add = lambda x, y: x + y
print(add(35))  # 8

# Lambda与排序
students = [('Alice'85), ('Bob'90), ('Charlie'78)]
students.sort(key=lambda x: x[1])
print(students)

# Lambda与map
numbers = [12345]
squared = list(map(lambda x: x**2, numbers))
print(squared)

# Lambda与filter
even_numbers = list(filter(lambda x: x % 2 == 0, numbers))
print(even_numbers)

六、字符串操作

6.1 常用字符串方法

text = "Hello, World!"

# 大小写转换
print(text.upper())        # HELLO, WORLD!
print(text.lower())        # hello, world!
print(text.title())        # Hello, World!
print(text.capitalize())   # Hello, world!

# 查找和替换
print(text.find('World'))  # 7
print(text.replace('World''Python'))  # Hello, Python!
print(text.count('l'))     # 3

# 判断方法
print(text.startswith('Hello'))  # True
print(text.endswith('!'))       # True
print(text.isdigit())           # False
print(text.isalpha())           # False
print(text.isalnum())           # False

# 分割和连接
words = text.split(', ')
print(words)  # ['Hello', 'World!']
joined = '-'.join(words)
print(joined)  # Hello-World!

# 去除空白
text = "  Hello  "
print(text.strip())   # Hello
print(text.lstrip())  # Hello  
print(text.rstrip())  #   Hello

七、文件操作

7.1 读写文件

# 写入文件
withopen('test.txt''w', encoding='utf-8'as f:
    f.write('Hello, World!\n')
    f.write('Python编程\n')

# 读取文件
withopen('test.txt''r', encoding='utf-8'as f:
    content = f.read()
print(content)

# 逐行读取
withopen('test.txt''r', encoding='utf-8'as f:
for line in f:
print(line.strip())

# 追加写入
withopen('test.txt''a', encoding='utf-8'as f:
    f.write('追加的内容\n')

7.2 文件和目录操作

import os

# 获取当前目录
current_dir = os.getcwd()
print(current_dir)

# 列出目录内容
files = os.listdir('.')
print(files)

# 判断路径
print(os.path.exists('test.txt'))
print(os.path.isfile('test.txt'))
print(os.path.isdir('mydir'))

# 创建目录
os.makedirs('mydir/subdir', exist_ok=True)

# 删除文件
os.remove('test.txt')

# 删除目录
os.rmdir('mydir')

八、异常处理

8.1 try-except

# 基本异常处理
try:
    result = 10 / 0
except ZeroDivisionError:
print("不能除以零")

# 多个异常
try:
    x = int(input("请输入数字: "))
    result = 10 / x
except ValueError:
print("请输入有效数字")
except ZeroDivisionError:
print("不能除以零")

# 捕获所有异常
try:
# 一些可能出错的代码
pass
except Exception as e:
print(f"发生错误: {e}")

# try-except-else-finally
try:
    result = 10 / 2
except ZeroDivisionError:
print("除以零")
else:
print(f"结果是: {result}")
finally:
print("无论如何都会执行")

8.2 抛出异常

# 抛出异常
defvalidate_age(age):
if age < 0:
raise ValueError("年龄不能为负数")
if age > 150:
raise ValueError("年龄不合理")
returnTrue

try:
    validate_age(-5)
except ValueError as e:
print(f"错误: {e}")

九、模块和包

9.1 导入模块

# 导入整个模块
import math
print(math.pi)
print(math.sqrt(16))

# 导入特定函数
from math import pi, sqrt
print(pi)
print(sqrt(16))

# 导入所有(不推荐)
from math import *

# 别名
import numpy as np
import pandas as pd

9.2 创建模块

# mymodule.py
defgreet(name):
returnf"Hello, {name}!"

PI = 3.14159

# 使用模块
import mymodule
print(mymodule.greet("Alice"))
print(mymodule.PI)

9.3 常用内置模块

# os模块 - 操作系统相关
import os
os.getcwd()           # 获取当前目录
os.listdir('.')       # 列出目录内容
os.path.exists('file')  # 判断文件是否存在

# sys模块 - 系统相关
import sys
sys.version           # Python版本
sys.path              # 搜索路径
sys.argv              # 命令行参数

# datetime模块 - 日期时间
from datetime import datetime, timedelta
now = datetime.now()
print(now)
print(now.strftime('%Y-%m-%d %H:%M:%S'))

# random模块 - 随机数
import random
print(random.randint(1100))     # 随机整数
print(random.random())            # 随机浮点数
print(random.choice([123]))   # 随机选择

# json模块 - JSON处理
import json
data = {'name''Alice''age'25}
json_str = json.dumps(data)
print(json_str)

十、面向对象编程

10.1 类和对象

# 定义类
classDog:
# 类属性
    species = "Canis familiaris"

# 初始化方法
def__init__(self, name, age):
self.name = name
self.age = age

# 实例方法
defbark(self):
returnf"{self.name} says Woof!"

# 字符串表示
def__str__(self):
returnf"{self.name}{self.age} years old"

# 创建对象
dog1 = Dog("Buddy"3)
dog2 = Dog("Charlie"5)

# 使用对象
print(dog1.name)
print(dog1.bark())
print(dog1)

10.2 继承

# 父类
classAnimal:
def__init__(self, name):
self.name = name

defspeak(self):
raise NotImplementedError("子类必须实现此方法")

# 子类
classCat(Animal):
defspeak(self):
returnf"{self.name} says Meow!"

classDog(Animal):
defspeak(self):
returnf"{self.name} says Woof!"

# 使用继承
cat = Cat("Kitty")
dog = Dog("Buddy")
print(cat.speak())
print(dog.speak())

总结

作为Python小白,这些是最基础、最常用的指令:

  1. 1. 基础环境 - Python安装、运行脚本
  2. 2. 数据类型 - 数字、字符串、布尔值
  3. 3. 数据结构 - 列表、元组、字典、集合
  4. 4. 流程控制 - 条件语句、循环语句
  5. 5. 函数 - 定义函数、Lambda函数
  6. 6. 字符串操作 - 常用字符串方法
  7. 7. 文件操作 - 读写文件
  8. 8. 异常处理 - try-except
  9. 9. 模块和包 - 导入和使用模块
  10. 10. 面向对象 - 类和对象、继承

掌握这些基础指令,你就能开始编写Python程序了!


关注我,获取更多Python技术干货!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 03:11:51 HTTP/2.0 GET : https://f.mffb.com.cn/a/500346.html
  2. 运行时间 : 0.128049s [ 吞吐率:7.81req/s ] 内存消耗:4,746.59kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=3989cfea7a7f7cc0d9da926fe3336879
  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.000875s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000433s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000674s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000916s ]
  6. SELECT * FROM `set` [ RunTime:0.000264s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000757s ]
  8. SELECT * FROM `article` WHERE `id` = 500346 LIMIT 1 [ RunTime:0.000614s ]
  9. UPDATE `article` SET `lasttime` = 1783105912 WHERE `id` = 500346 [ RunTime:0.017756s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000590s ]
  11. SELECT * FROM `article` WHERE `id` < 500346 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000825s ]
  12. SELECT * FROM `article` WHERE `id` > 500346 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000622s ]
  13. SELECT * FROM `article` WHERE `id` < 500346 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.004169s ]
  14. SELECT * FROM `article` WHERE `id` < 500346 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.006073s ]
  15. SELECT * FROM `article` WHERE `id` < 500346 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.019349s ]
0.131148s