当前位置:首页>python>用Python写了一个植物大战僵尸

用Python写了一个植物大战僵尸

  • 2026-01-10 15:38:08
用Python写了一个植物大战僵尸


植物大战僵尸

1. 引入需要的模块

import pygameimport random

2. 配置图片地址

IMAGE_PATH = 'imgs/'

3. 设置页面宽高

scrrr_width = 800scrrr_height = 560

4. 创建控制游戏结束的状态

GAMEOVER = False

5. 图片加载报错处理

LOG = '文件:{}中的方法:{}出错'.format(__file__, __name__)

6. 创建地图类

classMap():

7. 存储两张不同颜色的图片名称

map_names_list = [IMAGE_PATH + 'map1.png', IMAGE_PATH + 'map2.png']

8. 初始化地图

def__init__(self, x, y, img_index):    self.image = pygame.image.load(Map.map_names_list[img_index])    self.position = (x, y)

9. 是否能够种植

self.can_grow = True

10. 加载地图

defload_map(self):    MainGame.window.blit(self.image, self.position)

11. 植物类

classPlant(pygame.sprite.Sprite):    def__init__(self):        super(Plant, self).__init__()        self.live = True

12. 加载图片

defload_image(self):    if hasattr(self'image'and hasattr(self'rect'):        MainGame.window.blit(self.image, self.rect)    else:        print(LOG)

13. 向日葵类

classSunflower(Plant):    def__init__(self, x, y):        super(Sunflower, self).__init__()        self.image = pygame.image.load('imgs/sunflower.png')        self.rect = self.image.get_rect()        self.rect.x = x        self.rect.y = y        self.price = 50        self.hp = 100        # 5 时间计数器        self.time_count = 0

14. 新增功能:生成阳光

defproduce_money(self):    self.time_count += 1    if self.time_count == 25:        MainGame.money += 5        self.time_count = 0

15. 向日葵加入到窗口中

defdisplay_sunflower(self):    MainGame.window.blit(self.image, self.rect)

16. 豌豆射手类

classPeaShooter(Plant):    def__init__(self, x, y):        super(PeaShooter, self).__init__()        # self.image 为一个 surface        self.image = pygame.image.load('imgs/peashooter.png')        self.rect = self.image.get_rect()        self.rect.x = x        self.rect.y = y        self.price = 50        self.hp = 200        # 6 发射计数器        self.shot_count = 0

17. 增加射击方法

defshot(self):    # 6 记录是否应该射击    should_fire = False    for zombie in MainGame.zombie_list:        if zombie.rect.y == self.rect.y and zombie.rect.x < 800 and zombie.rect.x > self.rect.x:            should_fire = True    # 6 如果活着    if self.live and should_fire:        self.shot_count += 1        # 6 计数器到25发射一次        if self.shot_count == 25:            # 6 基于当前豌豆射手的位置,创建子弹            peabullet = PeaBullet(self)            # 6 将子弹存储到子弹列表中            MainGame.peabullet_list.append(peabullet)            self.shot_count = 0

18. 将豌豆射手加入到窗口中的方法

defdisplay_peashooter(self):    MainGame.window.blit(self.image, self.rect)

19. 豌豆子弹类

classPeaBullet(pygame.sprite.Sprite):    def__init__(self, peashooter):        self.live = True        self.image = pygame.image.load('imgs/peabullet.png')        self.damage = 50        self.speed = 10        self.rect = self.image.get_rect()        self.rect.x = peashooter.rect.x + 60        self.rect.y = peashooter.rect.y + 15    defmove_bullet(self):        # 7 在屏幕范围内,实现往右移动        if self.rect.x < scrrr_width:            self.rect.x += self.speed        else:            self.live = False    # 7 新增,子弹与僵尸的碰撞    defhit_zombie(self):        for zombie in MainGame.zombie_list:            if pygame.sprite.collide_rect(self, zombie):                # 打中僵尸之后,修改子弹的状态,                self.live = False                # 僵尸掉血                zombie.hp -= self.damage                if zombie.hp <= 0:                    zombie.live = False                    self.nextLevel()    # 7闯关方法    defnextLevel(self):        MainGame.score += 20        MainGame.remnant_score -= 20        for i in range(1100):            if MainGame.score == 100 * i and MainGame.remnant_score == 0:                MainGame.remnant_score = 100 * i                MainGame.shaoguan += 1                MainGame.produce_zombie += 50    defdisplay_peabullet(self):        MainGame.window.blit(self.image, self.rect)

20. 僵尸类

classZombie(pygame.sprite.Sprite):    def__init__(self, x, y):        super(Zombie, self).__init__()        self.image = pygame.image.load('imgs/zombie.png')        self.rect = self.image.get_rect()        self.rect.x = x        self.rect.y = y        self.hp = 1000        self.damage = 2        self.speed = 1        self.live = True        self.stop = False    # 9 僵尸的移动    defmove_zombie(self):        if self.live and not self.stop:            self.rect.x -= self.speed            if self.rect.x < -80:                # 8 调用游戏结束方法                MainGame().gameOver()    # 9 判断僵尸是否碰撞到植物,如果碰撞,调用攻击植物的方法    defhit_plant(self):        for plant in MainGame.plants_list:            if pygame.sprite.collide_rect(self, plant):                # 8  僵尸移动状态的修改                self.stop = True                self.eat_plant(plant)    # 9 僵尸攻击植物    defeat_plant(self, plant):        # 9 植物生命值减少        plant.hp -= self.damage        # 9 植物死亡后的状态修改,以及地图状态的修改        if plant.hp <= 0:            a = plant.rect.y // 80 - 1            b = plant.rect.x // 80            map = MainGame.map_list[a][b]            map.can_grow = True            plant.live = False            # 8 修改僵尸的移动状态            self.stop = False    # 9 将僵尸加载到地图中    defdisplay_zombie(self):        MainGame.window.blit(self.image, self.rect)

21. 主程序

class MainGame():    # 2 创建关数,得分,剩余分数,钱数    shaoguan = 1    score = 0    remnant_score = 100    money = 200    # 3 存储所有地图坐标点    map_points_list = []    # 3 存储所有的地图块    map_list = []    # 4 存储所有植物的列表    plants_list = []    # 7 存储所有豌豆子弹的列表    peabullet_list = []    # 9 新增存储所有僵尸的列表    zombie_list = []    count_zombie = 0    produce_zombie = 100    # 1 加载游戏窗口    def init_window(self):        # 1 调用显示模块的初始化        pygame.display.init()        # 1 创建窗口        MainGame.window = pygame.display.set_mode([scrrr_width, scrrr_height])    # 2 文本绘制    def draw_text(self, content, size, color):        pygame.font.init()        font = pygame.font.SysFont('kaiti', size)        text = font.render(content, True, color)        return text    # 2 加载帮助提示    def load_help_text(self):        text1 = self.draw_text('1.按左键创建向日葵 2.按右键创建豌豆射手'26, (25500))        MainGame.window.blit(text1, (55))    # 3 初始化坐标点    def init_plant_points(self):        for y in range(17):            points = []            for x in range(10):                point = (x, y)                points.append(point)            MainGame.map_points_list.append(points)            print("MainGame.map_points_list", MainGame.map_points_list)    # 3 初始化地图    def init_map(self):        for points in MainGame.map_points_list:            temp_map_list = list()            for point in points:                # map = None                if (point[0] + point[1]) % 2 == 0:                    map = Map(point[0] * 80, point[1] * 800)                else:                    map = Map(point[0] * 80, point[1] * 801)                # 将地图块加入到窗口中                temp_map_list.append(map)                print("temp_map_list", temp_map_list)            MainGame.map_list.append(temp_map_list)        print("MainGame.map_list", MainGame.map_list)    # 3 将地图加载到窗口中    def load_map(self):        for temp_map_list in MainGame.map_list:            for map in temp_map_list:                map.load_map()    # 6 增加豌豆射手发射处理    def load_plants(self):        for plant in MainGame.plants_list:            # 6 优化加载植物的处理逻辑            if plant.live:                if isinstance(plant, Sunflower):                    plant.display_sunflower()                    plant.produce_money()                elif isinstance(plant, PeaShooter):                    plant.display_peashooter()                    plant.shot()            else:                MainGame.plants_list.remove(plant)    # 7 加载所有子弹的方法    def load_peabullets(self):        for b in MainGame.peabullet_list:            if b.live:                b.display_peabullet()                b.move_bullet()                # v1.9 调用子弹是否打中僵尸的方法                b.hit_zombie()            else:                MainGame.peabullet_list.remove(b)    # 8事件处理    def deal_events(self):        # 8 获取所有事件        eventList = pygame.event.get()        # 8 遍历事件列表,判断        for e in eventList:            if e.type == pygame.QUIT:                self.gameOver()            elif e.type == pygame.MOUSEBUTTONDOWN:                # print('按下鼠标按键')                print(e.pos)                # print(e.button)#左键1  按下滚轮2 上转滚轮为4 下转滚轮为5  右键 3                x = e.pos[0] // 80                y = e.pos[1] // 80                print(x, y)                map = MainGame.map_list[y - 1][x]                print(map.position)                # 8 增加创建时候的地图装填判断以及金钱判断                if e.button == 1:                    if map.can_grow and MainGame.money >= 50:                        sunflower = Sunflower(map.position[0], map.position[1])                        MainGame.plants_list.append(sunflower)                        print('当前植物列表长度:{}'.format(len(MainGame.plants_list)))                        map.can_grow = False                        MainGame.money -= 50                elif e.button == 3:                    if map.can_grow and MainGame.money >= 50:                        peashooter = PeaShooter(                            map.position[0], map.position[1])                        MainGame.plants_list.append(peashooter)                        print('当前植物列表长度:{}'.format(len(MainGame.plants_list)))                        map.can_grow = False                        MainGame.money -= 50    # 9 新增初始化僵尸的方法    def init_zombies(self):        for i in range(17):            dis = random.randint(15) * 200            zombie = Zombie(800 + dis, i * 80)            MainGame.zombie_list.append(zombie)    # 9将所有僵尸加载到地图中    def load_zombies(self):        for zombie in MainGame.zombie_list:            if zombie.live:                zombie.display_zombie()                zombie.move_zombie()                # v2.0 调用是否碰撞到植物的方法                zombie.hit_plant()            else:                MainGame.zombie_list.remove(zombie)    # 1 开始游戏    def start_game(self):        # 1 初始化窗口        self.init_window()        # 3 初始化坐标和地图        self.init_plant_points()        self.init_map()        # 9 调用初始化僵尸的方法        self.init_zombies()        # 1 只要游戏没结束,就一直循环        while not GAMEOVER:            # 1 渲染白色背景            MainGame.window.fill((255255255))            # 2 渲染的文字和坐标位置            MainGame.window.blit(                self.draw_text(                    '当前钱数$: {}'.format(                        MainGame.money), 26, (25500)), (50040))            MainGame.window.blit(                self.draw_text(                    '当前关数{},得分{},距离下关还差{}分'.format(                        MainGame.shaoguan,                        MainGame.score,                        MainGame.remnant_score),                    26,                    (255,                     0,                     0)),                (5,                 40))            self.load_help_text()            # 3 需要反复加载地图            self.load_map()            # 6 调用加载植物的方法            self.load_plants()            # 7  调用加载所有子弹的方法            self.load_peabullets()            # 8 调用事件处理的方法            self.deal_events()            # 9 调用展示僵尸的方法            self.load_zombies()            # 9 计数器增长,每数到100,调用初始化僵尸的方法            MainGame.count_zombie += 1            if MainGame.count_zombie == MainGame.produce_zombie:                self.init_zombies()                MainGame.count_zombie = 0            pygame.time.wait(10)            pygame.display.update()    def gameOver(self):        MainGame.window.blit(            self.draw_text(                '游戏结束'50, (25500)), (300200))        print('游戏结束')        pygame.time.wait(400)        global GAMEOVER        GAMEOVER = Trueif __name__ == '__main__':    game = MainGame()    game.start_game()

写完的效果就是这样啦

PS:如果觉得我的分享不错,欢迎大家随手点赞、在看。

低价卡永久QQ绿钻黄钻超级会员会员,永久爱奇艺腾讯会员,网红商城-短视频加热助手、抖音快手大大提升上热门概率、空间人气、说说赞、QQ大会员、超级会员、全民K歌鲜花、QQ钻,

真人拼多多砍价,拆红包,现金大转盘等各种助力等。超多各种低价业务,欢迎收藏!500人帮砍!

自助下单地址:https://48.dye11.cn/7cBH7D44

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-09 02:25:14 HTTP/2.0 GET : https://f.mffb.com.cn/a/460752.html
  2. 运行时间 : 0.207265s [ 吞吐率:4.82req/s ] 内存消耗:4,698.49kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=81bce764271f9c4330c0c44c3245031b
  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.000556s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000679s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.002087s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.005198s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000582s ]
  6. SELECT * FROM `set` [ RunTime:0.007940s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000664s ]
  8. SELECT * FROM `article` WHERE `id` = 460752 LIMIT 1 [ RunTime:0.032575s ]
  9. UPDATE `article` SET `lasttime` = 1770575115 WHERE `id` = 460752 [ RunTime:0.010955s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000348s ]
  11. SELECT * FROM `article` WHERE `id` < 460752 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000514s ]
  12. SELECT * FROM `article` WHERE `id` > 460752 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.004748s ]
  13. SELECT * FROM `article` WHERE `id` < 460752 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.007332s ]
  14. SELECT * FROM `article` WHERE `id` < 460752 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001485s ]
  15. SELECT * FROM `article` WHERE `id` < 460752 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.059514s ]
0.209963s