当前位置:首页>python>Python赋值运算符——给变量“装东西”

Python赋值运算符——给变量“装东西”

  • 2026-02-26 00:56:13
Python赋值运算符——给变量“装东西”

一、什么是赋值运算符?

赋值运算符用于将值“装进”变量里——最基础的=就是赋值运算符。

# 基本赋值name = "小明"# 把"小明"赋给nameage = 18# 把18赋给age

二、7种赋值运算符

运算符
示例
等价于
说明
=x = 5x = 5
基本赋值
+=x += 3x = x + 3
加等于
-=x -= 3x = x - 3
减等于
*=x *= 3x = x * 3
乘等于
/=x /= 3x = x / 3
除等于
//=x //= 3x = x // 3
整除等于
%=x %= 3x = x % 3
取余等于
**=x **= 3x = x ** 3
幂等于

三、基本赋值 =

3.1 单个变量赋值

# 给变量赋值name = "张三"age = 25score = 95.5is_student = Trueprint(name, age, score, is_student)  # 张三 25 95.5 True

3.2 多个变量同时赋值

# 方式1:一行给多个变量赋值a, b, c = 123print(a, b, c)  # 1 2 3# 交换两个变量的值x = 10y = 20x, y = y, x     # 交换print(x, y)     # 20 10# 方式2:多个变量赋相同值m = n = p = 0print(m, n, p)  # 0 0 0

3.3 解包赋值

# 列表解包fruits = ["苹果""香蕉""橙子"]a, b, c = fruitsprint(a)  # 苹果print(b)  # 香蕉print(c)  # 橙子# 字符串解包x, y, z = "ABC"print(x, y, z)  # A B C# 只取部分(用*)numbers = [12345]first, *middle, last = numbersprint(first)   # 1print(middle)  # [2, 3, 4]print(last)    # 5

四、增强赋值运算符

4.1 加等于 +=

# 数字累加count = 0count += 1# count = count + 1print(count)    # 1count += 5# count = count + 5print(count)    # 6# 字符串拼接message = "Hello"message += " "message += "World"print(message)  # Hello World# 列表追加items = [12]items += [34]  # items = items + [3, 4]print(items)     # [1, 2, 3, 4]

4.2 减等于 -=

# 数字递减health = 100health -= 10# health = health - 10print(health)   # 90health -= 20# health = health - 20print(health)   # 70# 只能用于数字# name = "张三"# name -= "李"  # TypeError

4.3 乘等于 *=

# 数字乘法price = 10price *= 3# price = price * 3print(price)    # 30# 字符串重复symbol = "*"symbol *= 20# symbol = symbol * 20print(symbol)   # ********************# 列表重复pattern = [12]pattern *= 3# pattern = pattern * 3print(pattern)  # [1, 2, 1, 2, 1, 2]

4.4 除等于 /=

# 除法(结果是浮点数)total = 100total /= 4# total = total / 4print(total)    # 25.0total /= 2# total = total / 2print(total)    # 12.5# 注意:结果一定是浮点数x = 10x /= 2print(x)        # 5.0

4.5 整除等于 //=

# 整除x = 10x //= 3# x = x // 3print(x)        # 3x = 10.5x //= 3# x = x // 3print(x)        # 3.0(结果还是浮点数)

4.6 取余等于 %=

# 取余数x = 10x %= 3# x = x % 3print(x)        # 1# 判断奇偶num = 7num %= 2print(num)      # 1(奇数)# 每隔一段时间执行counter = 0whileTrue:    counter %= 5# 限制在0-4循环print(f"第{counter}次")    counter += 1if counter > 10:break

4.7 幂等于 **=

# 幂运算x = 2x **= 3# x = x ** 3print(x)        # 8x = 3x **= 2# x = x ** 2print(x)        # 9# 开方y = 9y **= 0.5# 平方根print(y)        # 3.0

五、赋值运算符的特性

5.1 赋值不会返回结果

# 赋值语句没有返回值# print(x = 5)  # 语法错误# 不能这样写# if x = 5:     # 语法错误,应该是 x == 5#     print("x等于5")

5.2 链式赋值从右向左

# 从右向左执行x = y = z = 0# 等价于:z = 0; y = z; x = yprint(x, y, z)  # 0 0 0# 复杂链式a = b = c = [123]a.append(4)print(a)  # [1, 2, 3, 4]print(b)  # [1, 2, 3, 4] 注意:b也变了print(c)  # [1, 2, 3, 4] 指向同一个列表

5.3 不可变类型 vs 可变类型

# 不可变类型(数字、字符串、元组)x = 10y = xx += 5print(x)  # 15print(y)  # 10(y不变)# 可变类型(列表、字典)a = [123]b = aa += [45]    # 相当于 a.extend([4, 5])print(a)  # [1, 2, 3, 4, 5]print(b)  # [1, 2, 3, 4, 5]  b也变了

六、实战案例

案例1:计数器

defcounter_demo():"""计数器的各种用法"""# 1. 简单计数    count = 0    count += 1    count += 1    count += 1print(f"简单计数:{count}")  # 3# 2. 循环计数    total = 0for i inrange(16):        total += iprint(f"1-5累加:{total}")   # 15# 3. 条件计数    scores = [859278639547]    passed = 0    failed = 0for score in scores:if score >= 60:            passed += 1else:            failed += 1print(f"及格:{passed}人,不及格:{failed}人")# 4. 加权计数    weight = 0    weight += 2    weight *= 1.5    weight **= 2print(f"加权结果:{weight}")# counter_demo()

案例2:购物车总价计算

defshopping_cart():"""购物车价格计算"""# 商品列表    cart = [        {"name""苹果""price"8.5"quantity"3},        {"name""香蕉""price"5.0"quantity"2},        {"name""牛奶""price"12.5"quantity"2},        {"name""面包""price"9.0"quantity"1}    ]# 使用赋值运算符计算总价    total = 0    discount = 0    tax = 0for item in cart:        subtotal = item["price"] * item["quantity"]        total += subtotalprint(f"{item['name']}{subtotal:.2f}元")print(f"\n小计:{total:.2f}元")# 满减优惠if total >= 200:        discount += 30print(f"满200减30:-{discount}元")elif total >= 100:        discount += 10print(f"满100减10:-{discount}元")    total -= discount# 计算税费    tax = total * 0.06    total += taxprint(f"税费(6%):+{tax:.2f}元")print(f"应付:{total:.2f}元")# 找零    paid = 200    change = paid    change -= totalprint(f"付款:{paid}元,找零:{change:.2f}元")# shopping_cart()

案例3:游戏角色状态

classGameCharacter:"""游戏角色类"""def__init__(self, name):self.name = nameself.hp = 100# 生命值self.mp = 50# 魔法值self.attack = 20# 攻击力self.defense = 10# 防御力self.level = 1# 等级self.exp = 0# 经验值deftake_damage(self, damage):"""受到伤害"""        actual_damage = max(1, damage - self.defense)self.hp -= actual_damageifself.hp < 0:self.hp = 0print(f"{self.name} 受到 {actual_damage} 点伤害,剩余 HP:{self.hp}")return actual_damagedefheal(self, amount):"""治疗"""self.hp += amountifself.hp > 100:self.hp = 100print(f"{self.name} 恢复 {amount} 点生命,当前 HP:{self.hp}")defgain_exp(self, amount):"""获得经验"""self.exp += amountprint(f"{self.name} 获得 {amount} 点经验")# 升级判断whileself.exp >= self.level * 100:self.exp -= self.level * 100self.level += 1self.attack += 5self.defense += 2self.hp = 100# 升级回满血print(f"✨ 升级啦!当前等级:{self.level}")defuse_skill(self, skill_name, mp_cost):"""使用技能"""ifself.mp >= mp_cost:self.mp -= mp_costprint(f"{self.name} 使用 {skill_name},剩余 MP:{self.mp}")returnTrueelse:print("MP 不足!")returnFalsedefshow_status(self):"""显示状态"""print("\n" + "=" * 40)print(f"角色:{self.name}")print(f"HP:{self.hp}/100")print(f"MP:{self.mp}/50")print(f"攻击:{self.attack}  防御:{self.defense}")print(f"等级:{self.level}  经验:{self.exp}/{self.level*100}")print("=" * 40)# 游戏过程hero = GameCharacter("勇者")hero.show_status()hero.take_damage(30)hero.take_damage(25)hero.heal(20)hero.use_skill("火球术"10)hero.gain_exp(120)hero.gain_exp(150)hero.show_status()

案例4:银行账户管理

classBankAccount:"""银行账户类"""def__init__(self, owner, balance=0):self.owner = ownerself.balance = balanceself.transactions = []defdeposit(self, amount):"""存款"""if amount > 0:self.balance += amountself.transactions.append(f"存款 +{amount}")print(f"存款成功!当前余额:{self.balance:.2f}元")returnTruereturnFalsedefwithdraw(self, amount):"""取款"""if0 < amount <= self.balance:self.balance -= amountself.transactions.append(f"取款 -{amount}")print(f"取款成功!当前余额:{self.balance:.2f}元")returnTrueelse:print("余额不足或金额无效")returnFalsedeftransfer(self, other, amount):"""转账"""ifself.withdraw(amount):            other.deposit(amount)self.transactions.append(f"转账给{other.owner} -{amount}")print(f"转账成功!")returnTruereturnFalsedefapply_interest(self, rate):"""计算利息"""        interest = self.balance * rateself.balance += interestself.transactions.append(f"利息 +{interest:.2f}")print(f"获得利息:{interest:.2f}元")defshow_history(self):"""显示交易记录"""print(f"\n{self.owner} 的交易记录:")for t inself.transactions[-5:]:  # 只显示最近5条print(f"  {t}")# 使用示例acc1 = BankAccount("张三"1000)acc2 = BankAccount("李四"500)acc1.deposit(500)      # 余额 += 500acc1.withdraw(200)     # 余额 -= 200acc1.transfer(acc2, 300)  # 余额 -= 300,acc2余额 += 300acc1.apply_interest(0.02# 余额 *= 1.02acc1.show_history()print(f"\n张三余额:{acc1.balance}")print(f"李四余额:{acc2.balance}")

案例5:数据分析统计

defdata_analysis():"""使用赋值运算符进行数据统计"""    data = [12352891456783563974]# 初始化统计量    total = 0    max_value = float('-inf')    min_value = float('inf')    count = 0    sum_squares = 0# 遍历数据for num in data:        total += num        count += 1        sum_squares += num ** 2if num > max_value:            max_value = numif num < min_value:            min_value = num# 计算平均值    average = total    average /= count# 计算方差:E(X²) - [E(X)]²    variance = sum_squares    variance /= count    variance -= average ** 2# 标准差    std_dev = variance ** 0.5# 输出结果print(f"原始数据:{data}")print(f"数据个数:{count}")print(f"总和:{total}")print(f"平均值:{average:.2f}")print(f"最大值:{max_value}")print(f"最小值:{min_value}")print(f"方差:{variance:.2f}")print(f"标准差:{std_dev:.2f}")# 归一化处理    normalized = []for num in data:        norm = (num - min_value) / (max_value - min_value)        normalized.append(norm)print(f"归一化后:{[round(n, 2for n in normalized]}")# data_analysis()

七、常见错误与注意事项

错误1:赋值运算符两边必须有变量

# ❌ 错误5 += 3# 左边不能是常量# ✅ 正确x = 5x += 3

错误2:混淆赋值和比较

# ❌ 常见错误if x = 5:    # 应该是 x == 5print("x等于5")# ✅ 正确if x == 5:print("x等于5")

错误3:变量未定义

# ❌ 错误total += 10# total 还没定义# ✅ 正确total = 0total += 10

错误4:类型不匹配

# ❌ 错误x = "Hello"x += 10# 字符串不能加数字# ✅ 正确x = "Hello"x += str(10)  # Hello10# 或者x = "Hello"x += "10"

八、赋值运算符速查表

运算符
示例
等价于
适用类型
=x = 5x = 5
所有类型
+=x += 3x = x + 3
数字、字符串、列表
-=x -= 3x = x - 3
数字
*=x *= 3x = x * 3
数字、字符串、列表
/=x /= 3x = x / 3
数字
//=x //= 3x = x // 3
数字
%=x %= 3x = x % 3
数字
**=x **= 3x = x ** 3
数字

九、记忆口诀

赋值运算符家族大基本等号最基础增强赋值七个娃加等减等乘等除整除取余和幂等加等常用于计数循环累加少不了减等常用扣血量乘等重复字符串除等结果是浮点取余限制循环圈幂等计算乘方快左边必须是变量右边可以是表达式代码简洁又高效从此告别重复写

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-28 16:08:32 HTTP/2.0 GET : https://f.mffb.com.cn/a/477018.html
  2. 运行时间 : 0.170715s [ 吞吐率:5.86req/s ] 内存消耗:4,704.19kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=da78ea59ac04fd98a0adb0bdc82482ae
  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.000993s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001382s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000681s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000676s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001329s ]
  6. SELECT * FROM `set` [ RunTime:0.000595s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001384s ]
  8. SELECT * FROM `article` WHERE `id` = 477018 LIMIT 1 [ RunTime:0.000735s ]
  9. UPDATE `article` SET `lasttime` = 1772266112 WHERE `id` = 477018 [ RunTime:0.004577s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000261s ]
  11. SELECT * FROM `article` WHERE `id` < 477018 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000401s ]
  12. SELECT * FROM `article` WHERE `id` > 477018 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001007s ]
  13. SELECT * FROM `article` WHERE `id` < 477018 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000626s ]
  14. SELECT * FROM `article` WHERE `id` < 477018 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.003634s ]
  15. SELECT * FROM `article` WHERE `id` < 477018 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.003624s ]
0.172352s