当前位置:首页>python>Python成员运算符——判断元素是否在序列中

Python成员运算符——判断元素是否在序列中

  • 2026-02-28 01:11:51
Python成员运算符——判断元素是否在序列中

一、什么是成员运算符?

成员运算符用于测试一个值是否存在于另一个对象(如字符串、列表、元组、集合、字典等)中。简单来说,就是问“这个东西在不在那个东西里面?”

# 成员运算符示例fruits = ["苹果""香蕉""橙子"]print("苹果"in fruits)   # Trueprint("葡萄"in fruits)   # Falseprint("西瓜"notin fruits) # True

二、2种成员运算符

运算符
含义
示例
结果
in
存在
'a' in 'abc'True
not in
不存在
'd' not in 'abc'True

三、in 运算符详解

3.1 在字符串中——判断子串

# 判断字符或子串是否在字符串中text = "Hello Python"print('H'in text)      # Trueprint('h'in text)      # False(区分大小写)print('Py'in text)     # Trueprint('Java'in text)   # False# 实际应用:检查输入是否包含敏感词comment = "这个产品真垃圾"if"垃圾"in comment:print("评论包含敏感词,需审核")

3.2 在列表中——判断元素

# 判断元素是否在列表中fruits = ["苹果""香蕉""橙子""葡萄"]print("香蕉"in fruits)     # Trueprint("西瓜"in fruits)     # False# 数字列表numbers = [12345]print(3in numbers)         # Trueprint(6in numbers)         # False# 实际应用:权限检查allowed_users = ["admin""manager""zhangsan"]username = "lisi"if username in allowed_users:print("欢迎登录")else:print("无权限")

3.3 在元组中

# 元组和列表用法相同colors = ("红""绿""蓝")print("红"in colors)    # Trueprint("黄"in colors)    # False# 元组是不可变的,但成员检查一样

3.4 在集合中——最快

# 集合的成员检查速度最快(哈希表)tags = {"Python""Java""C++""JavaScript"}print("Python"in tags)     # Trueprint("Go"in tags)         # False# 实际应用:去重后快速判断blacklist = {"ip1""ip2""ip3"}current_ip = "ip2"if current_ip in blacklist:print("禁止访问")

3.5 在字典中——检查键

# 字典的in检查的是键(key),不是值user = {"name""张三","age"25,"city""北京"}print("name"in user)       # True(键存在)print("张三"in user)       # False(值不会被检查)print("age"in user)        # Trueprint("phone"in user)      # False# 如果想检查值,需要结合values()print("张三"in user.values())  # True# 实际应用:检查表单字段是否齐全required_fields = ["name""email""age"]form_data = {"name""李四""email""li@test.com"}for field in required_fields:if field notin form_data:print(f"缺少字段:{field}")

3.6 在其他可迭代对象中

# range对象numbers = range(111)print(5in numbers)     # Trueprint(15in numbers)    # False# bytes对象data = b"hello"print(b'h'in data)     # True

四、not in 运算符

not in 是 in 的反向操作,判断不存在。

fruits = ["苹果""香蕉""橙子"]print("葡萄"notin fruits)   # Trueprint("苹果"notin fruits)   # False# 实际应用:黑名单检查blacklist = ["恶意用户1""恶意用户2"]user = "正常用户"if user notin blacklist:print("允许访问")# 与if not ... in 等价,但可读性更好ifnot user in blacklist:   # 不推荐,语义不够直接pass

五、成员运算符的底层原理

5.1 不同容器的检查效率

容器类型
时间复杂度
说明
列表(list)
O(n)
逐个扫描
元组(tuple)
O(n)
逐个扫描
集合(set)
O(1)
哈希表,极快
字典(dict)
O(1)
哈希表,检查键
字符串(str)
O(n)
子串搜索(优化算法)
import time# 列表 vs 集合 性能对比large_list = list(range(1000000))large_set = set(large_list)start = time.time()print(999999in large_list)print("列表耗时:", time.time() - start)start = time.time()print(999999in large_set)print("集合耗时:", time.time() - start)# 集合明显更快

5.2 自定义类支持成员运算符

classMyCollection:def__init__(self, items):self.items = itemsdef__contains__(self, item):# 定义 in 的行为return item inself.itemsmy_list = MyCollection([123])print(2in my_list)   # Trueprint(5in my_list)   # False

六、实战案例

案例1:登录验证(成员运算符应用)

deflogin_system():"""使用成员运算符进行登录验证"""    users = {"admin""123456","zhangsan""abc123","lisi""pass123"    }print("=" * 40)print("        用 户 登 录")print("=" * 40)    username = input("用户名:").strip()    password = input("密码:").strip()# 使用成员运算符检查用户是否存在if username notin users:print("❌ 用户不存在")returnFalse# 密码验证if users[username] != password:print("❌ 密码错误")returnFalseprint(f"✅ 欢迎 {username}")# 管理员特殊提示if username == "admin":print("您有管理员权限")returnTrue# login_system()

案例2:单词拼写检查

defspell_checker(word, dictionary):"""简单拼写检查器"""if word in dictionary:print(f"✅ '{word}' 拼写正确")else:print(f"❌ '{word}' 拼写错误,建议:")# 简单相似词提示(长度相近的)        suggestions = [w for w in dictionary iflen(w) == len(word)]if suggestions:print("   " + ", ".join(suggestions[:5]))else:print("   无建议")# 示例词典dictionary = {"apple""banana""orange""grape""peach""python""java"}spell_checker("apple", dictionary)spell_checker("appple", dictionary)spell_checker("pythin", dictionary)

案例3:购物车商品检查

defshopping_cart():"""购物车:检查商品是否存在"""    products = {"001": {"name""苹果""price"8.5},"002": {"name""香蕉""price"5.0},"003": {"name""牛奶""price"12.5},"004": {"name""面包""price"9.0}    }    cart = []whileTrue:print("\n商品列表:")for pid, info in products.items():print(f"{pid}{info['name']} ¥{info['price']}")        pid = input("请输入商品编号(或输入q结账):")if pid == 'q':break# 检查商品是否存在if pid notin products:print("❌ 商品编号不存在")continuetry:            qty = int(input("请输入数量:"))if qty <= 0:print("数量必须大于0")continueexcept ValueError:print("请输入有效数字")continue        cart.append({"pid": pid,"name": products[pid]["name"],"price": products[pid]["price"],"quantity": qty        })print(f"✅ {products[pid]['name']} 已加入购物车")# 显示购物车if cart:print("\n购物车内容:")        total = 0for item in cart:            subtotal = item["price"] * item["quantity"]            total += subtotalprint(f"{item['name']} x{item['quantity']} = ¥{subtotal:.2f}")print(f"总计:¥{total:.2f}")# shopping_cart()

案例4:数据清洗过滤

deffilter_data():"""过滤掉不需要的数据"""    raw_data = ["apple""""banana"None"orange"" ""grape"0False]# 过滤掉空值、None、空字符串# 注意:0 和 False 也是假值,但这里我们只想过滤空字符串和None    filtered = [item for item in raw_data if item notin (None""" ")]print(f"原始数据:{raw_data}")print(f"过滤后:{filtered}")# 更精确的控制:只保留字符串且非空    filtered2 = [item for item in raw_data ifisinstance(item, strand item.strip()]print(f"保留非空字符串:{filtered2}")filter_data()

案例5:权限管理

classPermissionManager:"""权限管理(使用成员运算符)"""def__init__(self):self.roles = {"admin": {"read""write""delete""manage"},"editor": {"read""write"},"viewer": {"read"},"guest"set()        }self.resources = {"/": {"public"True"required_permissions"set()},"/admin": {"public"False"required_permissions": {"manage"}},"/edit": {"public"False"required_permissions": {"write"}},"/view": {"public"True"required_permissions": {"read"}}        }defcheck_access(self, user_role, resource_path):"""检查用户是否有权限访问资源"""# 检查角色是否存在if user_role notinself.roles:returnFalse"无效角色"# 检查资源是否存在if resource_path notinself.resources:returnFalse"资源不存在"        resource = self.resources[resource_path]# 公共资源直接允许if resource["public"]:returnTrue"公共资源"# 检查所需权限        required = resource["required_permissions"]        user_perms = self.roles[user_role]# 用户权限必须包含所有所需权限if required.issubset(user_perms):returnTrue"权限满足"else:            missing = required - user_permsreturnFalsef"缺少权限:{missing}"defshow_access(self, user_role):"""显示用户可以访问的所有资源"""        accessible = []for path, info inself.resources.items():            allowed, _ = self.check_access(user_role, path)if allowed:                accessible.append(path)print(f"角色 {user_role} 可访问:{accessible}")# 测试pm = PermissionManager()test_cases = [    ("admin""/admin"),    ("editor""/admin"),    ("viewer""/edit"),    ("guest""/view"),]for role, path in test_cases:    allowed, reason = pm.check_access(role, path)    result = "✅"if allowed else"❌"print(f"{result}{role:8} 访问 {path:10} → {reason}")pm.show_access("editor")

七、常见错误与注意事项

错误1:在字典中误用in检查值

user = {"name""张三""age"25}# ❌ 错误if"张三"in user:   # False,因为检查的是键print("找到了")# ✅ 正确if"张三"in user.values():print("找到了")

错误2:字符串in区分大小写

text = "Hello World"# ❌ 大小写敏感print("hello"in text)  # False# ✅ 可以先统一大小写print("hello"in text.lower())  # True

错误3:使用in检查None或未定义变量

# ❌ 变量未定义if item in my_list:   # 如果my_list没定义,NameError# ✅ 先确保变量存在my_list = [123]if item in my_list:   # 如果item不存在也会NameError,但item通常是已知的

错误4:忽略类型一致

# 数字和字符串不匹配numbers = [123]print("1"in numbers)  # False,因为"1"是字符串,不是整数# 需要转换类型print(int("1"in numbers)  # True

错误5:对大列表频繁使用in(性能)

# 如果频繁检查成员,应该用集合large_list = list(range(1000000))# 多次检查性能差for i inrange(1000):if i in large_list:   # O(n) * 1000 = 很慢pass# 改为集合large_set = set(large_list)for i inrange(1000):if i in large_set:    # O(1) * 1000 = 快pass

八、成员运算符速查表

容器类型
in 检查什么
示例
结果
字符串
子串
'Py' in 'Python'True
列表
元素
2 in [1,2,3]True
元组
元素
(1,2) in [(1,2),(3,4)]True
集合
元素
'a' in {'a','b'}True
字典
'name' in {'name':'Tom'}True
range
整数
5 in range(1,10)True
bytes
字节
b'h' in b'hello'True

九、记忆口诀

成员运算符两个in 和 not in判断元素在不在字符串、列表、元组、集合、字典字符串里找子串列表里面找元素字典里面找键名集合里面最快查not in 是反义不在里面才为真权限检查最常用过滤数据也很棒注意大小写敏感键值区别要分清频繁检查用集合性能提升很明显

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-28 09:04:26 HTTP/2.0 GET : https://f.mffb.com.cn/a/477503.html
  2. 运行时间 : 0.132117s [ 吞吐率:7.57req/s ] 内存消耗:4,697.43kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=dbf9e3087d6bf6e85dcd2b4e8050619f
  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.000629s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000734s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000347s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000282s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000519s ]
  6. SELECT * FROM `set` [ RunTime:0.000218s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000624s ]
  8. SELECT * FROM `article` WHERE `id` = 477503 LIMIT 1 [ RunTime:0.003790s ]
  9. UPDATE `article` SET `lasttime` = 1772240666 WHERE `id` = 477503 [ RunTime:0.000519s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000278s ]
  11. SELECT * FROM `article` WHERE `id` < 477503 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000734s ]
  12. SELECT * FROM `article` WHERE `id` > 477503 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.016072s ]
  13. SELECT * FROM `article` WHERE `id` < 477503 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.014447s ]
  14. SELECT * FROM `article` WHERE `id` < 477503 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.004313s ]
  15. SELECT * FROM `article` WHERE `id` < 477503 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.006946s ]
0.133555s