当前位置:首页>python>Python实现迷宫小游戏2.0

Python实现迷宫小游戏2.0

  • 2026-02-02 09:20:08
Python实现迷宫小游戏2.0

去除多彩效果、并在窗口里绘制上下左右按钮的完整可运行版本。按钮是用 Pygame 直接绘制的,不需要额外图片,简单清晰、可点击、可移动玩家。

复杂版本

干扰版本

下面就是完整代码,你复制即可运行:


完整代码(无多彩 + 有上下左右按钮)

import pygameimport randomimport sys# 1. 配置MAZE_WIDTH = 21MAZE_HEIGHT = 15CELL_SIZE = 30WINDOW_WIDTH = MAZE_WIDTH * CELL_SIZEWINDOW_HEIGHT = MAZE_HEIGHT * CELL_SIZE + 100# 底部留空间放按钮# 颜色(无多彩,简洁风格)COLORS = {"bg": (242424),"wall": (505050),"path": (255255255),"start": (02550),"end": (25500),"player": (00255),"button": (100100100),"button_hover": (150150150),"button_text": (255255255)}# 初始化pygame.init()screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))pygame.display.set_caption("迷宫(无多彩 + 按钮控制)")clock = pygame.time.Clock()font = pygame.font.Font(None36)# 2. 生成迷宫(DFS)defcreate_maze(width, height):    maze = [[1for _ in range(width)] for _ in range(height)]    stack = []    start_x, start_y = 11    maze[start_y][start_x] = 0    stack.append((start_x, start_y))    directions = [(0-2), (02), (-20), (20)]while stack:        x, y = stack[-1]        unvisited = []for dx, dy in directions:            nx, ny = x + dx, y + dyif1 <= nx < width - 1and1 <= ny < height - 1and maze[ny][nx] == 1:                unvisited.append((dx, dy))if unvisited:            dx, dy = random.choice(unvisited)            nx, ny = x + dx, y + dy            maze[y + dy//2][x + dx//2] = 0            maze[ny][nx] = 0            stack.append((nx, ny))else:            stack.pop()    maze[1][1] = 2    maze[height-2][width-2] = 3return maze# 3. 绘制迷宫defdraw_maze(maze, player_pos):    screen.fill(COLORS["bg"])for y in range(MAZE_HEIGHT):for x in range(MAZE_WIDTH):            rect = pygame.Rect(x*CELL_SIZE, y*CELL_SIZE, CELL_SIZE, CELL_SIZE)if maze[y][x] == 1:                pygame.draw.rect(screen, COLORS["wall"], rect)elif maze[y][x] == 0:                pygame.draw.rect(screen, COLORS["path"], rect)elif maze[y][x] == 2:                pygame.draw.rect(screen, COLORS["start"], rect)elif maze[y][x] == 3:                pygame.draw.rect(screen, COLORS["end"], rect)# 绘制玩家    px, py = player_pos    player_rect = pygame.Rect(px*CELL_SIZE, py*CELL_SIZE, CELL_SIZE, CELL_SIZE)    pygame.draw.rect(screen, COLORS["player"], player_rect)    pygame.draw.rect(screen, (0,0,0), player_rect, 2)# 4. 按钮类classButton:def__init__(self, x, y, w, h, text):        self.rect = pygame.Rect(x, y, w, h)        self.text = textdefdraw(self):        color = COLORS["button_hover"if self.rect.collidepoint(pygame.mouse.get_pos()) else COLORS["button"]        pygame.draw.rect(screen, color, self.rect)        pygame.draw.rect(screen, (0,0,0), self.rect, 2)        text_surf = font.render(self.text, True, COLORS["button_text"])        text_rect = text_surf.get_rect(center=self.rect.center)        screen.blit(text_surf, text_rect)defis_clicked(self, event):if event.type == pygame.MOUSEBUTTONDOWN and event.button == 1:return self.rect.collidepoint(event.pos)returnFalse# 5. 移动校验defis_valid(maze, x, y):return0 <= x < MAZE_WIDTH and0 <= y < MAZE_HEIGHT and maze[y][x] != 1# 6. 主函数defmain():    maze = create_maze(MAZE_WIDTH, MAZE_HEIGHT)    player_pos = (11)# 创建按钮    btn_w, btn_h = 8050    btn_y = MAZE_HEIGHT * CELL_SIZE + 20    btn_up = Button(WINDOW_WIDTH//2 - btn_w//2, btn_y, btn_w, btn_h, "上")    btn_down = Button(WINDOW_WIDTH//2 - btn_w//2, btn_y + 60, btn_w, btn_h, "下")    btn_left = Button(WINDOW_WIDTH//2 - btn_w - 20, btn_y + 60, btn_w, btn_h, "左")    btn_right = Button(WINDOW_WIDTH//2 + 20, btn_y + 60, btn_w, btn_h, "右")    buttons = [btn_up, btn_down, btn_left, btn_right]    running = Truewhile running:        clock.tick(60)for event in pygame.event.get():if event.type == pygame.QUIT:                running = False# 按钮点击if btn_up.is_clicked(event):                x, y = player_posif is_valid(maze, x, y-1):                    player_pos = (x, y-1)if btn_down.is_clicked(event):                x, y = player_posif is_valid(maze, x, y+1):                    player_pos = (x, y+1)if btn_left.is_clicked(event):                x, y = player_posif is_valid(maze, x-1, y):                    player_pos = (x-1, y)if btn_right.is_clicked(event):                x, y = player_posif is_valid(maze, x+1, y):                    player_pos = (x+1, y)# 键盘控制(保留)if event.type == pygame.KEYDOWN:                x, y = player_posif event.key == pygame.K_UP and is_valid(maze, x, y-1):                    player_pos = (x, y-1)if event.key == pygame.K_DOWN and is_valid(maze, x, y+1):                    player_pos = (x, y+1)if event.key == pygame.K_LEFT and is_valid(maze, x-1, y):                    player_pos = (x-1, y)if event.key == pygame.K_RIGHT and is_valid(maze, x+1, y):                    player_pos = (x+1, y)# 绘制        draw_maze(maze, player_pos)for btn in buttons:            btn.draw()        pygame.display.flip()    pygame.quit()    sys.exit()if __name__ == "__main__":    main()

功能说明

  1. 去除了所有多彩效果迷宫现在是简洁的黑白灰风格。

  2. 底部添加了四个按钮

    • 按钮可点击,鼠标移上去会变色。
  3. 玩家仍可使用方向键控制保留键盘控制,也可以用鼠标点按钮。

  4. 玩家碰到终点会停在终点(可自行加通关提示)


让迷宫拥有更复杂的路线,提升探索难度和趣味性,基于之前的无多彩+按钮控制版本进行优化,通过核心参数调整和算法细节优化,实现路线更复杂、分支更多的迷宫,同时保持按钮控制等原有功能不变。

一、完整实现代码(复杂路线迷宫 + 按钮控制)

import pygameimport randomimport sys# 1. 配置(核心:增大迷宫尺寸,提升路线复杂度基础)MAZE_WIDTH = 81# 从21提升到81(奇数,保证通路完整性)MAZE_HEIGHT = 51# 从15提升到51(奇数,增加纵向分支)CELL_SIZE = 15# 适当缩小格子尺寸,避免窗口过大WINDOW_WIDTH = MAZE_WIDTH * CELL_SIZEWINDOW_HEIGHT = MAZE_HEIGHT * CELL_SIZE + 100# 底部留空间放按钮# 颜色(简洁风格,保留原有配置)COLORS = {"bg": (242424),"wall": (505050),"path": (255255255),"start": (02550),"end": (25500),"player": (00255),"button": (100100100),"button_hover": (150150150),"button_text": (255255255)}# 初始化pygame.init()screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))pygame.display.set_caption("复杂路线迷宫(按钮控制)")clock = pygame.time.Clock()font = pygame.font.Font(None36)# 2. 生成复杂路线迷宫(优化DFS算法,增加分支和迂回路线)defcreate_maze(width, height):"""    优化DFS算法生成复杂路线迷宫:    1. 更大的迷宫尺寸提供更多分支空间    2. 随机打乱方向列表,增加路线随机性    3. 保留更多未访问分支,提升迂回复杂度    """    maze = [[1for _ in range(width)] for _ in range(height)]    stack = []    start_x, start_y = 11    maze[start_y][start_x] = 0    stack.append((start_x, start_y))# 基础四个移动方向(每次移动2格,挖通中间墙壁)    base_directions = [(0-2), (02), (-20), (20)]while stack:        current_x, current_y = stack[-1]        unvisited = []# 关键优化1:每次循环随机打乱方向列表,增加路线不可预测性        shuffled_directions = random.sample(base_directions, len(base_directions))for dx, dy in shuffled_directions:            new_x = current_x + dx            new_y = current_y + dy# 边界判断:确保新坐标在迷宫范围内,且未被访问(仍为墙壁)if1 <= new_x < width - 1and1 <= new_y < height - 1and maze[new_y][new_x] == 1:                unvisited.append((dx, dy))if unvisited:# 关键优化2:随机选择未访问方向,增加分支多样性(核心提升复杂度)            dx, dy = random.choice(unvisited)            new_x = current_x + dx            new_y = current_y + dy# 挖通当前格子到新格子的中间墙壁,形成连续通路            maze[current_y + dy//2][current_x + dx//2] = 0            maze[new_y][new_x] = 0# 将新格子压入栈,继续深度探索,形成更多分支            stack.append((new_x, new_y))else:# 无未访问方向,回溯(弹出栈顶),探索其他分支            stack.pop()# 标记起点和终点(拉开距离,增加探索路径长度)    maze[1][1] = 2# 起点(左上角)    maze[height-2][width-2] = 3# 终点(右下角)return maze# 3. 绘制迷宫和玩家defdraw_maze(maze, player_pos):    screen.fill(COLORS["bg"])for y in range(MAZE_HEIGHT):for x in range(MAZE_WIDTH):            rect = pygame.Rect(x*CELL_SIZE, y*CELL_SIZE, CELL_SIZE, CELL_SIZE)if maze[y][x] == 1:                pygame.draw.rect(screen, COLORS["wall"], rect)elif maze[y][x] == 0:                pygame.draw.rect(screen, COLORS["path"], rect)elif maze[y][x] == 2:                pygame.draw.rect(screen, COLORS["start"], rect)elif maze[y][x] == 3:                pygame.draw.rect(screen, COLORS["end"], rect)# 绘制玩家    px, py = player_pos    player_rect = pygame.Rect(px*CELL_SIZE, py*CELL_SIZE, CELL_SIZE, CELL_SIZE)    pygame.draw.rect(screen, COLORS["player"], player_rect)    pygame.draw.rect(screen, (0,0,0), player_rect, 2)# 4. 按钮类(保留原有功能,支持悬浮变色和点击)classButton:def__init__(self, x, y, w, h, text):        self.rect = pygame.Rect(x, y, w, h)        self.text = textdefdraw(self):        color = COLORS["button_hover"if self.rect.collidepoint(pygame.mouse.get_pos()) else COLORS["button"]        pygame.draw.rect(screen, color, self.rect)        pygame.draw.rect(screen, (0,0,0), self.rect, 2)        text_surf = font.render(self.text, True, COLORS["button_text"])        text_rect = text_surf.get_rect(center=self.rect.center)        screen.blit(text_surf, text_rect)defis_clicked(self, event):if event.type == pygame.MOUSEBUTTONDOWN and event.button == 1:return self.rect.collidepoint(event.pos)returnFalse# 5. 移动校验(保留原有功能,防止玩家穿墙和越界)defis_valid(maze, x, y):return0 <= x < MAZE_WIDTH and0 <= y < MAZE_HEIGHT and maze[y][x] != 1# 6. 主函数(保留按钮控制和键盘控制)defmain():# 生成复杂路线迷宫    maze = create_maze(MAZE_WIDTH, MAZE_HEIGHT)    player_pos = (11)# 创建按钮    btn_w, btn_h = 8050    btn_y = MAZE_HEIGHT * CELL_SIZE + 20    btn_up = Button(WINDOW_WIDTH//2 - btn_w//2, btn_y, btn_w, btn_h, "上")    btn_down = Button(WINDOW_WIDTH//2 - btn_w//2, btn_y + 60, btn_w, btn_h, "下")    btn_left = Button(WINDOW_WIDTH//2 - btn_w - 20, btn_y + 60, btn_w, btn_h, "左")    btn_right = Button(WINDOW_WIDTH//2 + 20, btn_y + 60, btn_w, btn_h, "右")    buttons = [btn_up, btn_down, btn_left, btn_right]    running = Truewhile running:        clock.tick(60)for event in pygame.event.get():if event.type == pygame.QUIT:                running = False# 按钮点击控制玩家移动if btn_up.is_clicked(event):                x, y = player_posif is_valid(maze, x, y-1):                    player_pos = (x, y-1)if btn_down.is_clicked(event):                x, y = player_posif is_valid(maze, x, y+1):                    player_pos = (x, y+1)if btn_left.is_clicked(event):                x, y = player_posif is_valid(maze, x-1, y):                    player_pos = (x-1, y)if btn_right.is_clicked(event):                x, y = player_posif is_valid(maze, x+1, y):                    player_pos = (x+1, y)# 保留键盘方向键控制if event.type == pygame.KEYDOWN:                x, y = player_posif event.key == pygame.K_UP and is_valid(maze, x, y-1):                    player_pos = (x, y-1)if event.key == pygame.K_DOWN and is_valid(maze, x, y+1):                    player_pos = (x, y+1)if event.key == pygame.K_LEFT and is_valid(maze, x-1, y):                    player_pos = (x-1, y)if event.key == pygame.K_RIGHT and is_valid(maze, x+1, y):                    player_pos = (x+1, y)# 绘制迷宫、玩家和按钮        draw_maze(maze, player_pos)for btn in buttons:            btn.draw()        pygame.display.flip()    pygame.quit()    sys.exit()if __name__ == "__main__":    main()

二、提升迷宫路线复杂度的核心优化方案

1.  增大迷宫尺寸(基础前提)

  • 核心修改:将MAZE_WIDTH从21提升到81,MAZE_HEIGHT从15提升到51(均保持奇数,保证DFS算法通路完整性)。
  • 优化逻辑:更大的迷宫空间为DFS算法提供更多的分支探索可能,避免路线过于简短直白,自然形成更多迂回和分叉路线。
  • 配套调整:将CELL_SIZE从30缩小到15,防止窗口尺寸过大超出屏幕显示范围,保证迷宫整体可查看。

2.  优化DFS算法,增加路线随机性和分支多样性(核心关键)

DFS算法是生成迷宫的核心,通过两处优化大幅提升路线复杂度:

  • 优化1:每次循环随机打乱方向列表使用random.sample(base_directions, len(base_directions))打乱上下左右四个移动方向,避免算法始终按固定顺序探索方向(如先上后下再左再右),从而生成更不可预测、更杂乱的分支路线,减少规律性迷宫布局。
  • 优化2:随机选择未访问方向,保留更多分支对筛选出的未访问方向,使用random.choice(unvisited)随机选取,而非按固定顺序选取,让每个节点的分支走向更随机,形成更多的「死胡同」和「迂回通路」,提升迷宫的探索难度,这是让路线变复杂的核心步骤。

3.  拉开起点与终点距离,延长探索路径

  • 保持起点在左上角(1,1),终点在右下角(height-2, width-2),利用增大后的迷宫尺寸,让起点和终点之间的直线距离大幅增加。
  • 优化逻辑:玩家需要探索更多分支和迂回路线才能到达终点,不会出现「直线路径通关」的情况,从体验上强化迷宫的「复杂感」。

三、运行与使用说明

  1. 运行代码后,会生成一个大尺寸、多分支的复杂迷宫,底部保留上下左右可点击按钮。
  2. 操作方式:① 鼠标点击底部按钮控制玩家移动;② 使用键盘方向键控制玩家移动,两种方式兼容。
  3. 玩家无法穿墙和越界,需在复杂的分支路线中探索,找到通往右下角红色终点的路径。
  4. 按钮支持悬浮变色(鼠标移上去变亮),点击反馈清晰,迷宫布局简洁无多彩效果,专注于路线探索。
  5. 点击窗口右上角关闭按钮,可正常退出程序。

四、进一步提升复杂度的扩展建议

  1. 更换迷宫生成算法:使用「普里姆算法(Prim's Algorithm)」替代DFS,普里姆算法以「最小生成树」为核心,会生成更多交叉分支,迷宫复杂度更高,且路线更无规律。
  2. 增加迷宫障碍物:在生成迷宫后,随机在部分通路(非起点、非终点、非关键通路)中添加墙壁,形成更多死胡同,提升探索难度。
  3. 缩小玩家视野:添加视野遮蔽效果,玩家只能看到周围一定范围的迷宫,无法全局查看,增加探索的未知性和复杂度。
  4. 调整迷宫尺寸参数:继续增大MAZE_WIDTHMAZE_HEIGHT(如101×71),进一步增加分支数量,注意同步调整CELL_SIZE保证窗口适配屏幕。

总结

  1. 提升迷宫路线复杂度的核心是「增大空间基础+优化算法随机性+延长探索路径」,三者结合实现显著的复杂度提升。
  2. DFS算法的两处关键优化(打乱方向列表、随机选择分支),是在不更换算法的前提下,快速提升路线复杂度的高效方案。
  3. 优化后的代码保留了原有按钮控制、简洁风格等功能,同时实现了复杂路线迷宫的生成,可直接运行并进一步扩展。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 12:40:54 HTTP/2.0 GET : https://f.mffb.com.cn/a/464961.html
  2. 运行时间 : 0.090540s [ 吞吐率:11.04req/s ] 内存消耗:4,544.66kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=576fbf106d5e54a403e4aee7574b3b6c
  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.000589s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000750s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000334s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000282s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000483s ]
  6. SELECT * FROM `set` [ RunTime:0.000194s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000543s ]
  8. SELECT * FROM `article` WHERE `id` = 464961 LIMIT 1 [ RunTime:0.004968s ]
  9. UPDATE `article` SET `lasttime` = 1770525654 WHERE `id` = 464961 [ RunTime:0.003792s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000261s ]
  11. SELECT * FROM `article` WHERE `id` < 464961 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001930s ]
  12. SELECT * FROM `article` WHERE `id` > 464961 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000444s ]
  13. SELECT * FROM `article` WHERE `id` < 464961 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.004609s ]
  14. SELECT * FROM `article` WHERE `id` < 464961 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002635s ]
  15. SELECT * FROM `article` WHERE `id` < 464961 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000791s ]
0.092246s