当前位置:首页>python>秀啊!用Python斗地主,欢乐豆蹭蹭涨!

秀啊!用Python斗地主,欢乐豆蹭蹭涨!

  • 2026-07-03 00:01:32
秀啊!用Python斗地主,欢乐豆蹭蹭涨!
关注+星标,每天学习Python新技能

来源:网络

最近在网上看到一个有意思的开源项目,快手团队开发的开源AI斗地主——DouZero。今天我们就一起来学习制作一个基于DouZero的欢乐斗地主出牌器,看看AI是如何来帮助我们斗地主,赢欢乐豆,实现财富自由的吧!

首先一起来看看AI斗地主出牌器的效果:下面,我们开始介绍这个AI出牌器的制作过程。

一、核心功能设计

首先我们这款出牌器是基于DouZero开发的,核心是需要利用训练好的AI模型来帮住我们,给出最优出牌方案。

其次关于出牌器,先要需要确认一个AI出牌角色,代表我们玩家自己。我们只要给这个AI输入玩家手牌和三张底牌。确认好地主和农民的各个角色,告诉它三个人对应的关系,这样就可以确定队友和对手。我们还要将每一轮其他两人的出牌输入,这样出牌器就可以根据出牌数据,及时提供给我们最优出牌决策,带领我们取得胜利!

那么如何获取三者之间的关系呢?谁是地主?谁是农民?是自己一人作战还是农民合作?自己玩家的手牌是什么?三张底牌是什么?这些也都需要在开局后确认好。

拆解需求,大致可以整理出核心功能如下:

UI设计排版布局

  • 显示三张底牌

  • 显示AI角色出牌数据区域,上家出牌数据区域,下家出牌数据区域,本局胜率区域

  • AI玩家手牌区域

  • AI出牌器开始停止

手牌和出牌数据识别

  • 游戏刚开始根据屏幕位置,截图识别AI玩家手牌及三张底牌

  • 确认三者之间的关系,识别地主和农民角色,确认队友及对手关系

  • 识别每轮三位玩家依次出了什么牌,刷新显示对应区域

AI出牌方案输出

  • 加载训练好的AI模型,初始化游戏环境

  • 每轮出牌判断,根据上家出牌数据给出最优出牌决策

  • 自动刷新玩家剩余手牌和本局胜率预测

二、实现步骤

1. UI设计排版布局

根据上述功能,我们首先考虑进行简单的UI布局设计,这里我们使用的是pyqt5。核心设计代码如下:

defsetupUi(self, Form):    Form.setObjectName("Form")    Form.resize(440395)    font = QtGui.QFont()    font.setFamily("Arial")    font.setPointSize(9)    font.setBold(True)    font.setItalic(False)    font.setWeight(75)    Form.setFont(font)self.WinRate = QtWidgets.QLabel(Form)self.WinRate.setGeometry(QtCore.QRect(24018017161))    font = QtGui.QFont()    font.setPointSize(14)self.WinRate.setFont(font)self.WinRate.setAlignment(QtCore.Qt.AlignCenter)self.WinRate.setObjectName("WinRate")self.InitCard = QtWidgets.QPushButton(Form)self.InitCard.setGeometry(QtCore.QRect(6033012141))    font = QtGui.QFont()    font.setFamily("Arial")    font.setPointSize(14)    font.setBold(True)    font.setWeight(75)self.InitCard.setFont(font)self.InitCard.setStyleSheet("")self.InitCard.setObjectName("InitCard")self.UserHandCards = QtWidgets.QLabel(Form)self.UserHandCards.setGeometry(QtCore.QRect(1026042141))    font = QtGui.QFont()    font.setPointSize(14)self.UserHandCards.setFont(font)self.UserHandCards.setAlignment(QtCore.Qt.AlignCenter)self.UserHandCards.setObjectName("UserHandCards")self.LPlayer = QtWidgets.QFrame(Form)self.LPlayer.setGeometry(QtCore.QRect(108020161))self.LPlayer.setFrameShape(QtWidgets.QFrame.StyledPanel)self.LPlayer.setFrameShadow(QtWidgets.QFrame.Raised)self.LPlayer.setObjectName("LPlayer")self.LPlayedCard = QtWidgets.QLabel(self.LPlayer)self.LPlayedCard.setGeometry(QtCore.QRect(0020161))    font = QtGui.QFont()    font.setPointSize(14)self.LPlayedCard.setFont(font)self.LPlayedCard.setAlignment(QtCore.Qt.AlignCenter)self.LPlayedCard.setObjectName("LPlayedCard")self.RPlayer = QtWidgets.QFrame(Form)self.RPlayer.setGeometry(QtCore.QRect(2308020161))    font = QtGui.QFont()    font.setPointSize(16)self.RPlayer.setFont(font)self.RPlayer.setFrameShape(QtWidgets.QFrame.StyledPanel)self.RPlayer.setFrameShadow(QtWidgets.QFrame.Raised)self.RPlayer.setObjectName("RPlayer")self.RPlayedCard = QtWidgets.QLabel(self.RPlayer)self.RPlayedCard.setGeometry(QtCore.QRect(0020161))    font = QtGui.QFont()    font.setPointSize(14)self.RPlayedCard.setFont(font)self.RPlayedCard.setAlignment(QtCore.Qt.AlignCenter)self.RPlayedCard.setObjectName("RPlayedCard")self.Player = QtWidgets.QFrame(Form)self.Player.setGeometry(QtCore.QRect(4018017161))self.Player.setFrameShape(QtWidgets.QFrame.StyledPanel)self.Player.setFrameShadow(QtWidgets.QFrame.Raised)self.Player.setObjectName("Player")self.PredictedCard = QtWidgets.QLabel(self.Player)self.PredictedCard.setGeometry(QtCore.QRect(0017161))    font = QtGui.QFont()    font.setPointSize(14)self.PredictedCard.setFont(font)self.PredictedCard.setAlignment(QtCore.Qt.AlignCenter)self.PredictedCard.setObjectName("PredictedCard")self.ThreeLandlordCards = QtWidgets.QLabel(Form)self.ThreeLandlordCards.setGeometry(QtCore.QRect(1401016141))    font = QtGui.QFont()    font.setPointSize(16)self.ThreeLandlordCards.setFont(font)self.ThreeLandlordCards.setAlignment(QtCore.Qt.AlignCenter)self.ThreeLandlordCards.setObjectName("ThreeLandlordCards")self.Stop = QtWidgets.QPushButton(Form)self.Stop.setGeometry(QtCore.QRect(26033011141))    font = QtGui.QFont()    font.setFamily("Arial")    font.setPointSize(14)    font.setBold(True)    font.setWeight(75)self.Stop.setFont(font)self.Stop.setStyleSheet("")self.Stop.setObjectName("Stop")self.retranslateUi(Form)self.InitCard.clicked.connect(Form.init_cards)self.Stop.clicked.connect(Form.stop)    QtCore.QMetaObject.connectSlotsByName(Form)defretranslateUi(self, Form):    _translate = QtCore.QCoreApplication.translate    Form.setWindowTitle(_translate("Form""AI欢乐斗地主--Dragon少年"))self.WinRate.setText(_translate("Form""胜率:--%"))self.InitCard.setText(_translate("Form""开始"))self.UserHandCards.setText(_translate("Form""手牌"))self.LPlayedCard.setText(_translate("Form""上家出牌区域"))self.RPlayedCard.setText(_translate("Form""下家出牌区域"))self.PredictedCard.setText(_translate("Form""AI出牌区域"))self.ThreeLandlordCards.setText(_translate("Form""三张底牌"))    self.Stop.setText(_translate("Form""停止"))

实现效果如下:

2. 手牌和出牌数据识别

下面我们需要所有扑克牌的模板图片与游戏屏幕特定区域的截图进行对比,这样才能获取AI玩家手牌、底牌、每一轮出牌、三者关系(地主、地主上家、地主下家)。

识别AI玩家手牌及三张底牌:

我们可以截取游戏屏幕,根据固定位置来识别当前AI玩家的手牌和三张底牌。核心代码如下:

# 牌检测结果滤波defcards_filter(self, location, distance):  if len(location) == 0:return0    locList = [location[0][0]]    count = 1for e inlocation:        flag = 1# “是新的”标志for have inlocList:if abs(e[0] - have) <= distance:                flag = 0breakifflag:            count += 1            locList.append(e[0])return count# 获取玩家AI手牌deffind_my_cards(self, pos):    user_hand_cards_real = ""    img = pyautogui.screenshot(region=pos)for card inAllCards:        result = pyautogui.locateAll(needleImage='pics/m' + card + '.png', haystackImage=img, confidence=self.MyConfidence)        user_hand_cards_real += card[1] * self.cards_filter(list(result), self.MyFilter)return user_hand_cards_real# 获取地主三张底牌deffind_three_landlord_cards(self, pos):    three_landlord_cards_real = ""    img = pyautogui.screenshot(region=pos)    img = img.resize((349168))for card inAllCards:        result = pyautogui.locateAll(needleImage='pics/o' + card + '.png', haystackImage=img,                                     confidence=self.ThreeLandlordCardsConfidence)        three_landlord_cards_real += card[1] * self.cards_filter(list(result), self.OtherFilter)    return three_landlord_cards_real

效果如下所示:

地主、地主上家、地主下家:

同理我们可以根据游戏屏幕截图,识别地主的图标,确认地主角色。核心代码如下:

# 查找地主角色deffind_landlord(self, landlord_flag_pos):for pos in landlord_flag_pos:        result = pyautogui.locateOnScreen('pics/landlord_words.png', region=pos, confidence=self.LandlordFlagConfidence)if result isnotNone:return landlord_flag_pos.index(pos)    return None

这样我们就可以得到玩家AI手牌,其他玩家手牌(预测),地主三张底牌,三者角色关系,出牌顺序。核心代码如下:

# 坐标self.MyHandCardsPos = (414804104159)  # AI玩家截图区域self.LPlayedCardsPos = (530470380160)  # 左侧玩家截图区域self.RPlayedCardsPos = (1010470380160)  # 右侧玩家截图区域self.LandlordFlagPos = [(1320300110140), (320720110140), (500300110140)]  # 地主标志截图区域(右-我-左)self.ThreeLandlordCardsPos = (81736287136)      # 地主底牌截图区域,resize成349x168definit_cards(self):# 玩家手牌self.user_hand_cards_real = ""self.user_hand_cards_env = []# 其他玩家出牌self.other_played_cards_real = ""self.other_played_cards_env = []# 其他玩家手牌(整副牌减去玩家手牌,后续再减掉历史出牌)self.other_hand_cards = []# 三张底牌self.three_landlord_cards_real = ""self.three_landlord_cards_env = []# 玩家角色代码:0-地主上家, 1-地主, 2-地主下家self.user_position_code = Noneself.user_position = ""# 开局时三个玩家的手牌self.card_play_data_list = {}# 出牌顺序:0-玩家出牌, 1-玩家下家出牌, 2-玩家上家出牌self.play_order = 0self.env = None# 识别玩家手牌self.user_hand_cards_real = self.find_my_cards(self.MyHandCardsPos)self.UserHandCards.setText(self.user_hand_cards_real)self.user_hand_cards_env = [RealCard2EnvCard[c] for c in list(self.user_hand_cards_real)]# 识别三张底牌self.three_landlord_cards_real = self.find_three_landlord_cards(self.ThreeLandlordCardsPos)self.ThreeLandlordCards.setText("底牌:" + self.three_landlord_cards_real)self.three_landlord_cards_env = [RealCard2EnvCard[c] for c in list(self.three_landlord_cards_real)]# 识别玩家的角色self.user_position_code = self.find_landlord(self.LandlordFlagPos)ifself.user_position_code is None:        items = ("地主上家""地主""地主下家")        item, okPressed = QInputDialog.getItem(self"选择角色""未识别到地主,请手动选择角色:", items, 0False)if okPressed anditem:self.user_position_code = items.index(item)else:returnself.user_position = ['landlord_up''landlord''landlord_down'][self.user_position_code]for player inself.Players:        player.setStyleSheet('background-color: rgba(255, 0, 0, 0);')self.Players[self.user_position_code].setStyleSheet('background-color: rgba(255, 0, 0, 0.1);')# 整副牌减去玩家手上的牌,就是其他人的手牌,再分配给另外两个角色(如何分配对AI判断没有影响)for i in set(AllEnvCard):self.other_hand_cards.extend([i] * (AllEnvCard.count(i) - self.user_hand_cards_env.count(i)))self.card_play_data_list.update({'three_landlord_cards'self.three_landlord_cards_env,        ['landlord_up''landlord''landlord_down'][(self.user_position_code + 0) % 3]:self.user_hand_cards_env,        ['landlord_up''landlord''landlord_down'][(self.user_position_code + 1) % 3]:self.other_hand_cards[0:17if (self.user_position_code + 1) % 3 != 1elseself.other_hand_cards[17:],        ['landlord_up''landlord''landlord_down'][(self.user_position_code + 2) % 3]:self.other_hand_cards[0:17if (self.user_position_code + 1) % 3 == 1elseself.other_hand_cards[17:]    })    print(self.card_play_data_list)# 生成手牌结束,校验手牌数量if len(self.card_play_data_list["three_landlord_cards"]) != 3:        QMessageBox.critical(self"底牌识别出错""底牌必须是3张!", QMessageBox.Yes, QMessageBox.Yes)self.init_display()returnif len(self.card_play_data_list["landlord_up"]) != 17or \        len(self.card_play_data_list["landlord_down"]) != 17or \        len(self.card_play_data_list["landlord"]) != 20:        QMessageBox.critical(self"手牌识别出错""初始手牌数目有误", QMessageBox.Yes, QMessageBox.Yes)self.init_display()return# 得到出牌顺序    self.play_order = 0 if self.user_position == "landlord" else 1 if self.user_position == "landlord_up" else 2

效果如下:

3. AI出牌方案输出

下面我们就需要用到DouZero开源的AI斗地主了。DouZero项目地址:https://github.com/kwai/DouZero。我们需要将该开源项目下载并导入项目中。

创建一个AI玩家角色,初始化游戏环境,加载模型,进行每轮的出牌判断,控制一局游戏流程的进行和结束。核心代码如下:

# 创建一个代表玩家的AIai_players = [00]ai_players[0] = self.user_positionai_players[1] = DeepAgent(self.user_position, self.card_play_model_path_dict[self.user_position])# 初始化游戏环境self.env = GameEnv(ai_players)# 游戏开始self.start()def start(self):self.env.card_play_init(self.card_play_data_list)print("开始出牌\n")while not self.env.game_over:# 玩家出牌时就通过智能体获取action,否则通过识别获取其他玩家出牌ifself.play_order == 0:self.PredictedCard.setText("...")            action_message = self.env.step(self.user_position)# 更新界面self.UserHandCards.setText("手牌:" + str(''.join(                [EnvCard2RealCard[c] for c in self.env.info_sets[self.user_position].player_hand_cards]))[::-1])self.PredictedCard.setText(action_message["action"if action_message["action"else"不出")self.WinRate.setText("胜率:" + action_message["win_rate"])print("\n手牌:"str(''.join(                    [EnvCard2RealCard[c] for c in self.env.info_sets[self.user_position].player_hand_cards])))print("出牌:", action_message["action"if action_message["action"else"不出"", 胜率:",                  action_message["win_rate"])whileself.have_white(self.RPlayedCardsPos) == 1or \                    pyautogui.locateOnScreen('pics/pass.png',                                             region=self.RPlayedCardsPos,                                             confidence=self.LandlordFlagConfidence):print("等待玩家出牌")self.counter.restart()whileself.counter.elapsed() < 100:                    QtWidgets.QApplication.processEvents(QEventLoop.AllEvents, 50)self.play_order = 1        elif self.play_order == 1:self.RPlayedCard.setText("...")            pass_flag = Nonewhileself.have_white(self.RPlayedCardsPos) == 0and \                    not pyautogui.locateOnScreen('pics/pass.png',                                                 region=self.RPlayedCardsPos,                                                 confidence=self.LandlordFlagConfidence):print("等待下家出牌")self.counter.restart()whileself.counter.elapsed() < 500:                    QtWidgets.QApplication.processEvents(QEventLoop.AllEvents, 50)self.counter.restart()whileself.counter.elapsed() < 500:                QtWidgets.QApplication.processEvents(QEventLoop.AllEvents, 50)# 不出            pass_flag = pyautogui.locateOnScreen('pics/pass.png',                                                 region=self.RPlayedCardsPos,                                                 confidence=self.LandlordFlagConfidence)# 未找到"不出"if pass_flag is None:# 识别下家出牌self.other_played_cards_real = self.find_other_cards(self.RPlayedCardsPos)# 找到"不出"else:self.other_played_cards_real = ""print("\n下家出牌:"self.other_played_cards_real)self.other_played_cards_env = [RealCard2EnvCard[c] for c in list(self.other_played_cards_real)]self.env.step(self.user_position, self.other_played_cards_env)# 更新界面self.RPlayedCard.setText(self.other_played_cards_real ifself.other_played_cards_real else"不出")self.play_order = 2        elif self.play_order == 2:self.LPlayedCard.setText("...")whileself.have_white(self.LPlayedCardsPos) == 0and \                    not pyautogui.locateOnScreen('pics/pass.png',                                                region=self.LPlayedCardsPos,                                                confidence=self.LandlordFlagConfidence):print("等待上家出牌")self.counter.restart()whileself.counter.elapsed() < 500:                    QtWidgets.QApplication.processEvents(QEventLoop.AllEvents, 50)self.counter.restart()whileself.counter.elapsed() < 500:                QtWidgets.QApplication.processEvents(QEventLoop.AllEvents, 50)# 不出            pass_flag = pyautogui.locateOnScreen('pics/pass.png',                                                 region=self.LPlayedCardsPos,                                                 confidence=self.LandlordFlagConfidence)# 未找到"不出"if pass_flag is None:# 识别上家出牌self.other_played_cards_real = self.find_other_cards(self.LPlayedCardsPos)# 找到"不出"else:self.other_played_cards_real = ""print("\n上家出牌:"self.other_played_cards_real)self.other_played_cards_env = [RealCard2EnvCard[c] for c in list(self.other_played_cards_real)]self.env.step(self.user_position, self.other_played_cards_env)self.play_order = 0# 更新界面self.LPlayedCard.setText(self.other_played_cards_real ifself.other_played_cards_real else"不出")else:            passself.counter.restart()whileself.counter.elapsed() < 100:            QtWidgets.QApplication.processEvents(QEventLoop.AllEvents, 50)print("{}胜,本局结束!\n".format("农民"ifself.env.winner == "farmer"else"地主"))    QMessageBox.information(self"本局结束""{}胜!".format("农民"ifself.env.winner == "farmer"else"地主"),                            QMessageBox.Yes, QMessageBox.Yes)self.env.reset()    self.init_display()

到这里,整个AI斗地主出牌流程基本已经完成了。

三、出牌器用法

按照上述过程,这款AI出牌器已经制作完成了。后面应该如何使用呢?如果不想研究源码,只想使用这款AI斗地主出牌器,验证下效果,该怎么配置环境运行这个AI出牌器呢?下面就开始介绍。

1. 环境配置

首先我们需要安装这些第三方库,配置相关环境,如下所示:

torch==1.9.0GitPython==3.0.5gitdb2==2.0.6PyAutoGUI==0.9.50PyQt5==5.13.0PyQt5-sip==12.8.1Pillow>=5.2.0opencv-pythonrlcard

2. 坐标调整确认

我们可以打开欢乐斗地主游戏界面,将游戏窗口模式下最大化运行,把AI出牌器程序窗口需要移至右下角,不能遮挡手牌、地主标志、底牌、历史出牌这些关键位置。

其次我们要确认屏幕截图获取的各个区域是否正确。如果有问题需要进行区域位置坐标调整。

# 坐标self.MyHandCardsPos = (414804104159)  # 我的截图区域self.LPlayedCardsPos = (530470380160)  # 左边截图区域self.RPlayedCardsPos = (1010470380160)  # 右边截图区域self.LandlordFlagPos = [(1320300110140), (320720110140), (500300110140)]  # 地主标志截图区域(右-我-左)self.ThreeLandlordCardsPos = (81736287136)      # 地主底牌截图区域,resize成349x168

3. 运行测试

当所有环境配置完成,各区域坐标位置确认无误之后,下面我们就可以直接运行程序,测试效果啦~

首先我们运行AI出牌器程序,打开欢乐斗地主游戏界面,进入游戏。当玩家就位,手牌分发完毕,地主身份确认之后,我们就可以点击画面中开始按钮,让AI来帮助我们斗地主了。

下面可以一起来看看这款AI出牌器的实验效果喔,看看AI是如何带领农民打倒地主,取得胜利的!

长按或扫描下方二维码,免费获取 Python公开课和大佬打包整理的几百G的学习资料,内容包含但不限于Python电子书、教程、项目接单、源码等等

扫描二维码-免费领取

推荐阅读

一口气用Python写了13个小游戏(附源码)

让 Python 循环最快的方式,就是不用循环?

Python匿名函数4不要

Python猴子补丁是啥意思?

点击 阅读原文了解更多

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 01:04:23 HTTP/2.0 GET : https://f.mffb.com.cn/a/502523.html
  2. 运行时间 : 0.125588s [ 吞吐率:7.96req/s ] 内存消耗:4,560.81kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=0e3dae8a89f19b05f2ace29e4c36d659
  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.000679s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000801s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000308s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000304s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000532s ]
  6. SELECT * FROM `set` [ RunTime:0.000202s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000535s ]
  8. SELECT * FROM `article` WHERE `id` = 502523 LIMIT 1 [ RunTime:0.000644s ]
  9. UPDATE `article` SET `lasttime` = 1783011863 WHERE `id` = 502523 [ RunTime:0.030874s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000472s ]
  11. SELECT * FROM `article` WHERE `id` < 502523 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000679s ]
  12. SELECT * FROM `article` WHERE `id` > 502523 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.012120s ]
  13. SELECT * FROM `article` WHERE `id` < 502523 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000758s ]
  14. SELECT * FROM `article` WHERE `id` < 502523 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.005516s ]
  15. SELECT * FROM `article` WHERE `id` < 502523 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000744s ]
0.127259s