当前位置:首页>python>Python实战-病毒防卫战

Python实战-病毒防卫战

  • 2026-02-06 08:30:50
Python实战-病毒防卫战

第4课 病毒防卫战

一、作品展示

二、作品分析与制作

2.1 素材简介

3个背景:游戏中,游戏成功,游戏失败

2个角色:卫士,病毒(4个造型)

2.2 游戏背景加载

任务1:创建一个宽480高650的游戏界面,显示游戏中背景,点击关闭窗口按钮,窗口关闭,游戏退出,并将所有背景角色素材载入,并设置合适的图片大小

import pygameimport syspygame.init()screen_size = width, height = (480, 650)screen = pygame.display.set_mode(screen_size)pygame.display.set_caption("病毒防卫战")# 加载背景图片,并适配屏幕bg_game = pygame.image.load('./images/bg1.png')bg_success = pygame.image.load('./images/bg2.png')bg_fail = pygame.image.load('./images/bg3.png')bg_game = pygame.transform.scale(bg_game, screen_size)bg_success = pygame.transform.scale(bg_success, screen_size)bg_fail = pygame.transform.scale(bg_fail, screen_size)# 加载角色图片boy_size = boy_width, boy_height = 80, 100boy_img = pygame.image.load('./images/boy.png')boy_img = pygame.transform.scale(boy_img, boy_size)virus_img = []virus_size = virus_width, virus_height = 30, 30for i in range(4):    img = pygame.image.load("./images/virus{}.png".format(i))    pygame.transform.scale(img, virus_size)    virus_img.append(img)running = Truewhile running:    # 加载背景    screen.blit(bg_game, (0, 0))    # 处理事件    for event in pygame.event.get():        if event.type == pygame.QUIT:            running = False            pygame.quit()            sys.exit()    # 更新屏幕画面    pygame.display.update()

2.2 卫士

任务2:创建一个卫士类,初始化他的位置、大小、造型和生命值,游戏中只有一个卫士角色,能够跟着鼠标移动

1)创建卫士类,设置初始方法进行初始化,显示方法show()将其显示在游戏界面上,移动方法move()使其跟着鼠标的位置移动

class Boy:    def __init__(self):        # 初始化位置(屏幕中间)        self.x = width / 2        self.y = height / 2        # 初始化大小        self.width = boy_width        self.height = boy_height        # 初始化造型        self.img = boy_img        # 初始化生命值        self.life = 1    def show(self):        screen.blit(self.img, (self.x, self.y))    # 设置卫士移动的方法,跟随鼠标移动    def move(self, mouseX, mouseY):        self.x = mouseX - self.width / 2        self.y = mouseY - self.height / 2

2)创建一个卫士对象,调用显示方法和移动方法,使其动起来

2.3 病毒

任务3:创建病毒类,初始化它的位置、大小、造型、移动速度、移动参照物,根据轮数,显示病毒,如第1轮显示1个病毒,第2轮显示2个病毒……

1)创建病毒类,类中有init()方法初始化它的信息,show()方法将其显示在游戏界面上

class Virus:    def __init__(self, x, y, img_index, speed, mouse_x, mouse_y):        # 初始化位置        self.x = x        self.y = y        # 初始化大小        self.width = virus_width        self.height = virus_height        # 初始化造型        self.img = virus_img[img_index]        # 初始化速度        self.speed = speed        # 固定鼠标的位置(当前卫士的位置)        self.mouse_x = mouse_x        self.mouse_y = mouse_y        # 设置移动的方位距离        self.move_x = 0        self.move_y = 0    def show(self):        screen.blit(self.img, (self.x, self.y))

2)创建create_virus(num, mouse_x, mouse_y)函数,用于创建指定个数病毒

num:此次创建的病毒对象个数

mouse_x:病毒移动参照物的x坐标

mouse_y:病毒移动参照物的y坐标

def create_virus(num, mouse_x, mouse_y):    virus_list = []    # 该轮病毒移动的速度    speed = num * 0.4 + 0.4 * random.random()    for i in range(num):        # 病毒的4个随机位置,x坐标范围是0到(屏幕的宽-病毒的宽)        # y坐标的范围是0到(屏幕的高-病毒的高)        rand_pos = random.randint(03)        x = random.random() * (width - virus_width)        y = random.random() * (height - virus_height)        # 病毒的造型下标,随机0到3        virus_index = random.randint(03)        # 创建病毒        if rand_pos == 0:            virus = Virus(x, 0, virus_index, speed, mouse_x, mouse_y)        elif rand_pos == 1:            virus = Virus(0, y, virus_index, speed, mouse_x, mouse_y)        elif rand_pos == 2:            virus = Virus(width - virus_width, y, virus_index, speed, mouse_x, mouse_y)        else:            virus = Virus(x, height - virus_height, virus_index, speed, mouse_x, mouse_y)        # 将新产生的病毒存入列表        virus_list.append(virus)    return virus_list

病毒的可能位置图示:

3)创建show_virus(virus_list)函数,显示所有的病毒

def show_virus(virus_list):    for i in range(len(virus_list)):        virus_list[i].show()

4)调用create_virus()函数和show_virus()函数,将本轮病毒显示在游戏窗口上。只有窗口上没有病毒,才产生新的一轮病毒

任务4:所有病毒可以朝着卫士的方向一直移动

1)在Virus病毒类中创建setMoveXY()方法设置病毒需要移动的方位距离,创建move()方法,使得病毒可以移动

    def setMoveXY(self):        # 获取病毒到卫士的x,y轴的向量        dx = self.mouse_x - self.x        dy = self.mouse_y - self.y        # 两者重合时不移动        if dx == 0 and dy == 0:            return        # 获取两者直线距离(欧几里德距离)        dis = math.hypot(dx, dy)        # 确定移动的方位向量        self.move_x = dx / dis        self.move_y = dy / dis    def move(self):        # 移动        self.x += self.move_x * self.speed        self.y += self.move_y * self.speed

设置x,y方向上的移动距离图示:

2)在创建病毒的方法中,调用setMoveXY()函数,设置病毒移动的初始方向

3)创建move_virus(virus_list)函数,能让所有病毒都移动

def move_virus(virus_list):    for i in range(len(virus_list)):        virus_list[i].move()

4)在while running中调用病毒移动的方法,让该函数生效

2.4 越界监测与碰撞监测

任务5:在游戏窗口指定位置显示游戏轮数与卫士的生命值

1)创建fill_text(text, position)显示文字函数,用于后续显示相关文字

def fill_text(textposition):    textFont = pygame.font.Font("./fonts/WRYH.ttf"25)    newText = textFont.render(text, True, (25500))    screen.blit(newText, position)

2)在while running中调用该方法显示需要显示的文字

任务6:如果所有病毒已经超过游戏界面的范围,则新的一轮病毒开始攻击

1)创建outSide(virus_list)方法,监测病毒是否已经越界,如果已经越界,则移除该病毒

def outSide(virus_list):    for i in range(len(virus_list)):        virus = virus_list[i]        if virus.x <= -virus_width or virus.x >= width or virus.y <= -virus_height or virus.y >= height:            virus_list.remove(virus)            break

2)在while running中调用该方法

任务7:碰撞检测,如果卫士碰到病毒,病毒消失,卫士的生命值减1,如果卫士坚持5轮病毒,则游戏胜利,显示胜利背景,如果卫士的生命值为0,则游戏失败,显示失败背景

1)创建碰撞监测函数collision(virus_list, boy)用于监测病毒和卫士之间是否有碰撞

如上图,以病毒图片的矩形红框为参照物,如果不在这个范围内,则没有碰撞

def collision(virus_list, boy):    for i in range(len(virus_list)):        virus = virus_list[i]        # 矩形范围监测        if boy.x < virus.x - boy.width or boy.x > virus.x + virus.width:            return False        if boy.y < virus.y - boy.height or boy.y > virus.y + virus.height:            return False

但是即使处在矩形范围内,仍有可能没有碰撞,因为卫士图片矩形和病毒图片矩形之间仍然有空白缝隙,则可以做像素级别的碰撞监测

def collision(virus_list, boy):    for i in range(len(virus_list)):        virus = virus_list[i]        # 矩形范围监测        if boy.x < virus.x - boy.width or boy.x > virus.x + virus.width:            return False        if boy.y < virus.y - boy.height or boy.y > virus.y + virus.height:            return False        # 像素级别监测        virus_alpha = virus.img        boy_alpha = boy.img        for x in range(virus_alpha.get_width()):            for y in range(virus_alpha.get_height()):                # 如果这一点不是透明的                if virus_alpha.get_at((x, y)) != (0000):                    # 获取这一点在窗口上的位置                    xx, yy = x + virus.x, y + virus.y                    # 获取这一点相对于卫士的位置                    xxx, yyy = int(xx - boy.x), int(yy - boy.y)                    # 如果在卫士的图片范围内,且卫士的这一点也不是透明的,则说明撞上了                    if (0 <= xxx <= boy.width and 0 <= yyy <= boy.height                            and boy_alpha.get_at((xxx, yyy)) != (0000)):                        virus_list.remove(virus)  # 如果碰到了,病毒消失                        return True        return False

点击“阅读原文”获取资源

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-08 19:22:58 HTTP/2.0 GET : https://f.mffb.com.cn/a/462977.html
  2. 运行时间 : 0.237790s [ 吞吐率:4.21req/s ] 内存消耗:4,591.07kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=6df842843dc4bd343c604ab329fdaec0
  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.001144s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001862s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000683s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000562s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001329s ]
  6. SELECT * FROM `set` [ RunTime:0.000501s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001403s ]
  8. SELECT * FROM `article` WHERE `id` = 462977 LIMIT 1 [ RunTime:0.001076s ]
  9. UPDATE `article` SET `lasttime` = 1770549778 WHERE `id` = 462977 [ RunTime:0.109510s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000729s ]
  11. SELECT * FROM `article` WHERE `id` < 462977 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001022s ]
  12. SELECT * FROM `article` WHERE `id` > 462977 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.007879s ]
  13. SELECT * FROM `article` WHERE `id` < 462977 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.012606s ]
  14. SELECT * FROM `article` WHERE `id` < 462977 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002132s ]
  15. SELECT * FROM `article` WHERE `id` < 462977 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.013640s ]
0.240922s