当前位置:首页>python>Python实战项目之大富翁

Python实战项目之大富翁

  • 2026-04-17 00:55:08
Python实战项目之大富翁

大富翁是一款经典的休闲策略类桌面游戏,核心玩法围绕掷骰子前进、购买土地、缴纳过路费、触发随机事件展开,玩家通过资产积累击败对手。本文以Python为开发语言,基于控制台交互实现简化版大富翁小游戏,包含完整代码、逐行代码解析、开发逻辑拆解,全文约3000字,适合Python初学者巩固基础语法、函数、循环、条件判断、列表字典等核心知识点。

一、项目需求分析

本项目为控制台版简化大富翁,核心功能规划如下:

1. 支持2名玩家对战,区分玩家身份与初始资产;

2. 模拟掷骰子随机前进,步数1-6随机生成;

3. 地图包含土地、随机事件、空地三种格子;

4. 玩家可购买未归属的土地,其他玩家经过需缴纳过路费;

5. 触发随机事件(奖励现金、罚款、原地停留);

6. 实时展示玩家位置、资产、土地归属;

7. 资产为负则判定破产,对手获胜,游戏结束。

二、开发环境与核心知识点

1. 开发环境

- Python 3.x(无需第三方库,纯原生代码实现)

- 运行工具:IDLE、PyCharm、VS Code均可

2. 核心知识点

- 基础语法:变量、输入输出、循环、条件判断

- 数据结构:列表(存储地图)、字典(存储玩家信息)

- 函数封装:模块化拆分掷骰子、移动、购买土地、事件触发等功能

- 随机数模块: random 实现骰子点数与随机事件

- 逻辑控制:游戏主循环、胜负判定、交互逻辑

三、完整项目代码

python  

# 导入随机数模块,用于掷骰子和随机事件

import random

import time

# -------------------------- 游戏初始化配置 --------------------------

# 定义游戏地图,0=空地,1=可购买土地,2=随机事件格子

game_map = [0, 1, 2, 1, 0, 1, 2, 1, 0, 1,

            2, 1, 0, 1, 2, 1, 0, 1, 2, 1]

# 土地价格与过路费配置,索引对应地图位置

land_price = [0, 500, 0, 600, 0, 700, 0, 550, 0, 800,

               0, 650, 0, 750, 0, 600, 0, 900, 0, 700]

land_toll = [0, 100, 0, 150, 0, 200, 0, 120, 0, 250,

             0, 180, 0, 220, 0, 160, 0, 300, 0, 200]

# 初始化玩家信息,使用字典存储

player1 = {

    "name": "玩家1",

    "position": 0,    # 初始位置

    "money": 3000,    # 初始资金

    "lands": []       # 拥有的土地索引

}

player2 = {

    "name": "玩家2",

    "position": 0,

    "money": 3000,

    "lands": []

}

# -------------------------- 游戏核心功能函数 --------------------------

def roll_dice():

    """模拟掷骰子,返回1-6的随机数"""

    print("\n正在掷骰子...")

    time.sleep(1)

    num = random.randint(1, 6)

    print(f"掷出点数:{num}")

    return num

def move_player(player, steps):

    """移动玩家位置,处理地图循环"""

    total_pos = player["position"] + steps

    # 地图长度为20,超出则循环

    player["position"] = total_pos % len(game_map)

    print(f"{player['name']} 移动到位置 {player['position']}")

def trigger_event(player):

    """触发随机事件,奖励/罚款/停留"""

    event_type = random.randint(1, 4)

    if event_type == 1:

        reward = random.randint(200, 500)

        player["money"] += reward

        print(f"触发好运事件!获得奖励 {reward} 元")

    elif event_type == 2:

        fine = random.randint(100, 400)

        player["money"] -= fine

        print(f"触发意外事件!缴纳罚款 {fine} 元")

    elif event_type == 3:

        print("触发停留事件!本轮无法操作")

        return True

    else:

        print("平安无事,未触发任何事件")

    return False

def buy_land(player, pos):

    """处理土地购买逻辑"""

    price = land_price[pos]

    if player["money"] >= price:

        player["money"] -= price

        player["lands"].append(pos)

        print(f"{player['name']} 花费 {price} 元购买了位置 {pos} 的土地")

    else:

        print("资金不足,无法购买该土地")

def pay_toll(player, owner):

    """缴纳过路费给土地所有者"""

    pos = player["position"]

    toll = land_toll[pos]

    if player["money"] >= toll:

        player["money"] -= toll

        owner["money"] += toll

        print(f"{player['name']} 向 {owner['name']} 缴纳过路费 {toll} 元")

    else:

        # 资金不足全额抵扣,所有者获得剩余资金

        owner["money"] += player["money"]

        player["money"] = 0

        print(f"{player['name']} 资金不足,剩余资产全部抵扣过路费")

def check_bankruptcy(player):

    """检查玩家是否破产"""

    return player["money"] < 0

def show_status(player1, player2):

    """展示双方玩家当前状态"""

    print("\n==================== 玩家状态 ====================")

    print(f"{player1['name']}:位置 {player1['position']},资金 {player1['money']} 元,拥有土地 {player1['lands']}")

    print(f"{player2['name']}:位置 {player2['position']},资金 {player2['money']} 元,拥有土地 {player2['lands']}")

    print("==================================================\n")

# -------------------------- 游戏主循环 --------------------------

def main_game():

    """游戏主逻辑"""

    print("========== 欢迎来到Python大富翁小游戏 ==========")

    print("游戏规则:掷骰子前进,购买土地收取过路费,资金为负即破产")

    input("按回车键开始游戏...")

    current_player = player1  # 初始玩家1先手

    while True:

        # 展示玩家状态

        show_status(player1, player2)

        print(f"当前回合:{current_player['name']}")

        input("按回车键掷骰子...")

        # 掷骰子并移动

        steps = roll_dice()

        move_player(current_player, steps)

        current_pos = current_player["position"]

        # 判断当前格子类型

        grid_type = game_map[current_pos]

        # 1. 空地:无操作

        if grid_type == 0:

            print("当前位置为空地,无任何操作")

        # 2. 土地格子:判断归属

        elif grid_type == 1:

            # 判断土地是否已被购买

            if current_pos in player1["lands"]:

                print("当前土地为自己所有,无需操作")

            elif current_pos in player2["lands"]:

                # 确定所有者

                owner = player2 if current_pos in player2["lands"] else player1

                pay_toll(current_player, owner)

            else:

                # 未被购买,询问是否购买

                choice = input(f"该土地可购买,价格 {land_price[current_pos]} 元,是否购买?(y/n):")

                if choice.lower() == "y":

                    buy_land(current_player, current_pos)

                else:

                    print("放弃购买该土地")

        # 3. 随机事件格子

        elif grid_type == 2:

            print("到达随机事件格子!")

            skip_turn = trigger_event(current_player)

            if skip_turn:

                # 触发停留事件,切换回合

                current_player = player2 if current_player == player1 else player1

                continue

        # 检查是否破产

        if check_bankruptcy(player1):

            print(f"\n{player1['name']} 破产!{player2['name']} 获胜!")

            break

        if check_bankruptcy(player2):

            print(f"\n{player2['name']} 破产!{player1['name']} 获胜!")

            break

        # 切换玩家回合

        current_player = player2 if current_player == player1 else player1

        print("="*50)

# 启动游戏

if __name__ == "__main__":

    main_game()

四、代码逐行深度分析

(一)模块导入部分

python  

import random

import time

1.  random :核心用于生成骰子点数(1-6)和随机事件类型,是游戏随机性的核心依赖;

2.  time :通过 time.sleep(1) 实现掷骰子的延迟效果,提升游戏交互体验,避免操作过快。

(二)游戏初始化配置

1. 地图定义

python  

game_map = [0, 1, 2, 1, 0, 1, 2, 1, 0, 1,2, 1, 0, 1, 2, 1, 0, 1, 2, 1]

使用列表模拟20格大富翁地图,用数字区分格子类型:0=空地、1=土地、2=随机事件,通过索引对应位置,方便后续逻辑判断。

2. 土地价格与过路费

python  

land_price = [0, 500, 0, 600,...]

land_toll = [0, 100, 0, 150,...]

两个列表与地图索引一一对应,空地对应价格和过路费为0,土地格子设置不同数值,增加游戏策略性。

3. 玩家信息初始化

用字典存储玩家核心属性:姓名、位置、资金、拥有土地,字典结构清晰,便于后续修改和读取属性。

(三)核心功能函数解析

1. 掷骰子函数 roll_dice() 

- 无参数,返回1-6随机整数;

- 加入 time.sleep(1) 模拟真实掷骰子的等待过程;

- 打印点数,实现可视化交互。

2. 移动函数 move_player() 

- 接收玩家字典和骰子步数,计算新位置;

- 用 总位置%地图长度 实现地图循环,避免超出列表索引;

- 实时打印玩家位置,清晰展示移动结果。

3. 随机事件函数 trigger_event() 

- 生成1-4随机数对应4种事件:奖励、罚款、停留、无事件;

- 直接修改玩家资金,返回布尔值判断是否跳过回合;

- 随机数值范围可调整,平衡游戏难度。

4. 购买土地函数 buy_land() 

- 校验玩家资金是否足够,足够则扣除资金并将土地索引加入玩家土地列表;

- 资金不足则提示失败,保证游戏逻辑合理。

5. 过路费函数 pay_toll() 

- 计算过路费,扣除当前玩家资金,增加土地所有者资金;

- 处理资金不足的边界情况,避免出现负数异常。

6. 状态展示与破产检查

-  show_status() 实时打印双方资产、位置、土地,让玩家清晰掌握局势;

-  check_bankruptcy() 通过判断资金是否小于0,快速判定胜负。

(四)游戏主循环 main_game() 

1. 游戏启动

打印欢迎语和规则,等待玩家输入开始游戏,降低上手门槛。

2. 回合制逻辑

- 初始设定玩家1先手,通过 current_player 切换回合;

- 每回合先展示状态,再掷骰子移动,符合大富翁传统玩法。

3. 格子类型判断

根据当前位置的地图数值,分别处理空地、土地、事件格子,逻辑分层清晰,无冗余代码。

4. 胜负判定

每回合结束后检查玩家是否破产,破产则立即结束循环并宣布获胜者。

五、游戏运行流程详细分析

1. 启动阶段

运行代码后,控制台打印欢迎界面,玩家按回车进入

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-17 03:40:03 HTTP/2.0 GET : https://f.mffb.com.cn/a/485495.html
  2. 运行时间 : 0.083873s [ 吞吐率:11.92req/s ] 内存消耗:4,465.29kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=7290a229ed4377484ee59d65bc74ac0e
  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.000561s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000802s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000329s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000266s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000593s ]
  6. SELECT * FROM `set` [ RunTime:0.000248s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000718s ]
  8. SELECT * FROM `article` WHERE `id` = 485495 LIMIT 1 [ RunTime:0.000502s ]
  9. UPDATE `article` SET `lasttime` = 1776368403 WHERE `id` = 485495 [ RunTime:0.006785s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000288s ]
  11. SELECT * FROM `article` WHERE `id` < 485495 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000611s ]
  12. SELECT * FROM `article` WHERE `id` > 485495 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000577s ]
  13. SELECT * FROM `article` WHERE `id` < 485495 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000858s ]
  14. SELECT * FROM `article` WHERE `id` < 485495 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001509s ]
  15. SELECT * FROM `article` WHERE `id` < 485495 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002361s ]
0.085397s