当前位置:首页>python>Python selenium模块详细介绍

Python selenium模块详细介绍

  • 2026-03-25 05:41:40
Python selenium模块详细介绍

1. 创始时间与作者

  • 创始时间Selenium 项目始于 2004年(首个版本 Selenium Core)

  • 核心开发者

    • Jason Huggins:ThoughtWorks工程师,创建了最初的JavaScriptTestRunner(Selenium核心前身)

    • Simon Stewart:开发了WebDriver,后与Selenium合并

    • 社区贡献:超过200位主要贡献者,数千名开发者参与

  • 项目定位:跨平台Web自动化测试框架,支持多种浏览器和编程语言


2. 官方资源

  • GitHub 地址https://github.com/SeleniumHQ/selenium

  • 官方网站https://www.selenium.dev

  • 文档地址https://www.selenium.dev/documentation/

  • 浏览器驱动https://www.selenium.dev/downloads/

  • Python 文档https://selenium-python.readthedocs.io/


3. 核心功能

4. 应用场景

1. 自动化测试
from selenium import webdriverfrom selenium.webdriver.common.by import Byimport unittestclass TestLogin(unittest.TestCase):def setUp(self):self.driver = webdriver.Chrome()self.driver.get("https://example.com/login")def test_valid_login(self):self.driver.find_element(By.ID"username").send_keys("testuser")self.driver.find_element(By.ID"password").send_keys("secure123")self.driver.find_element(By.ID"login-btn").click()welcome = self.driver.find_element(By.CSS_SELECTOR".welcome-message").textself.assertIn("Welcome testuser"welcome)def tearDown(self):self.driver.quit()if __name__ == "__main__":unittest.main()
2. 网页数据抓取
from selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECdriver = webdriver.Firefox()driver.get("https://ecommerce.com/products")products = []try:# 等待商品加载WebDriverWait(driver10).until(EC.presence_of_element_located((By.CLASS_NAME"product-item"))# 获取所有商品items = driver.find_elements(By.CLASS_NAME"product-item")for item in items:name = item.find_element(By.CLASS_NAME"product-name").textprice = item.find_element(By.CLASS_NAME"product-price").textproducts.append({"name"name"price"price})# 分页处理while True:next_btn = driver.find_element(By.CSS_SELECTOR".pagination .next")if "disabled" in next_btn.get_attribute("class"):breaknext_btn.click()# 等待新内容加载WebDriverWait(driver5).until(EC.staleness_of(items[0]))items = driver.find_elements(By.CLASS_NAME"product-item")finally:driver.quit()print(f"共获取 {len(products)} 个商品")
3. 自动化表单提交
from selenium importwebdriverfrom selenium.webdriver.common.keys import Keysimport timedriver = webdriver.Edge()driver.get("https://forms.example.com")# 填写表单driver.find_element(By.NAME"fullname").send_keys("张三")driver.find_element(By.NAME"email").send_keys("zhangsan@example.com")driver.find_element(By.XPATH"//input[@value='male']").click()# 选择日期date_picker = driver.find_element(By.ID"birthdate")date_picker.send_keys("19900101")date_picker.send_keys(Keys.TAB)# 上传文件driver.find_element(By.ID"resume").send_keys("/path/to/resume.pdf")# 选择下拉菜单from selenium.webdriver.support.select import Selectcountry_select = Select(driver.find_element(By.ID"country"))country_select.select_by_visible_text("中国")# 提交表单driver.find_element(By.ID"submit-btn").click()# 验证提交成功success_msg = WebDriverWait(driver10).until(EC.visibility_of_element_located((By.CLASS_NAME"success-message"))print("表单提交成功:"success_msg.text)driver.quit()
4. 复杂用户交互模拟
from selenium importwebdriverfrom selenium.webdriver.common.action_chains import ActionChainsdriver = webdriver.Chrome()driver.get("https://design-tool.example.com")# 创建动作链actions = ActionChains(driver)# 拖拽操作source = driver.find_element(By.ID"element-source")target = driver.find_element(By.ID"element-target")actions.drag_and_drop(sourcetarget).perform()# 鼠标悬停menu = driver.find_element(By.ID"main-menu")actions.move_to_element(menu).perform()driver.find_element(By.LINK_TEXT"高级设置").click()# 组合键操作text_area = driver.find_element(By.ID"content")actions.key_down(Keys.CONTROL).send_keys("a").key_up(Keys.CONTROL).perform()  # Ctrl+Aactions.send_keys(Keys.DELETE).perform()  # 删除内容# 复杂绘图canvas = driver.find_element(By.ID"drawing-canvas")actions.move_to_element_with_offset(canvas100100).click_and_hold()actions.move_by_offset(500).move_by_offset(050)actions.move_by_offset(-500).move_by_offset(0-50).release().perform()driver.quit()

5. 底层逻辑与技术原理

核心架构
关键技术
  1. WebDriver协议

    • 基于HTTP的RESTful协议

    • 标准化浏览器自动化命令(W3C标准)

    • 支持跨语言实现(Python, Java, C#, JavaScript等)

  2. 浏览器驱动

    • Chrome: ChromeDriver

    • Firefox: GeckoDriver

    • Edge: MicrosoftWebDriver

    • Safari: SafariDriver

  3. 元素定位策略

    • ID, Class Name, Tag Name

    • XPath, CSS Selectors

    • Link Text, Partial Link Text

    • 自定义定位策略

  4. 页面等待机制

    • 隐式等待:全局等待时间

    • 显式等待:条件触发等待

    • FluentWait:灵活等待策略

  5. 浏览器通信

    • 使用浏览器原生自动化接口

    • Chrome: Chrome DevTools Protocol

    • Firefox: Marionette


6. 安装与配置

Python 包安装
pip install selenium==4.0.0
浏览器驱动安装
# ChromeDriver (匹配Chrome版本)# 下载地址: https://sites.google.com/chromium.org/driver/# GeckoDriver (Firefox)# 下载地址: https://github.com/mozilla/geckodriver/releases# 将驱动放入系统PATH或指定路径
基础配置示例
from selenium import webdriverfrom selenium.webdriver.chrome.options import Options# 配置Chrome选项chrome_options = Options()chrome_options.add_argument("--headless")  # 无头模式chrome_options.add_argument("--disable-gpu")  # 禁用GPUchrome_options.add_argument("--window-size=1920,1080")  # 窗口大小chrome_options.add_argument("--disable-extensions")  # 禁用扩展chrome_options.add_argument("--no-sandbox")  # Docker环境需要# 创建驱动实例driver = webdriver.Chrome(executable_path='/path/to/chromedriver',options=chrome_options)
环境要求
组件最低要求推荐配置
Python3.6+3.8+
浏览器Chrome, Firefox, Edge等最新稳定版
内存1GB4GB+
浏览器驱动需匹配浏览器版本自动管理工具推荐

7. 高级功能使用

1. 无头浏览器模式
from selenium import webdriverfrom selenium.webdriver.chrome.options import Optionsoptions = Options()options.add_argument("--headless=new")  # 新版无头模式options.add_argument("--disable-gpu")options.add_argument("--window-size=1920,1080")driver = webdriver.Chrome(options=options)driver.get("https://example.com")print("页面标题:"driver.title)driver.save_screenshot("headless_screenshot.png")driver.quit()
2. 处理iframe和弹窗
driver.get("https://example.com/iframe-page")# 切换到iframeiframe = driver.find_element(By.TAG_NAME"iframe")driver.switch_to.frame(iframe)# 操作iframe内元素driver.find_element(By.ID"iframe-btn").click()# 切回主文档driver.switch_to.default_content()# 处理弹窗alert = driver.switch_to.alertprint("弹窗文本:"alert.text)alert.accept()  # 确认# alert.dismiss()  # 取消
3. 执行JavaScript
# 执行简单JSdriver.execute_script("window.scrollTo(0, document.body.scrollHeight);")# 获取元素属性element = driver.find_element(By.ID"my-element")bg_color = driver.execute_script("return arguments[0].style.backgroundColor;"element)# 修改页面内容driver.execute_script("document.title = '新标题';")# 复杂JS交互script = """var element = document.getElementById('target');element.style.border = '2px solid red';return element.getBoundingClientRect();"""result = driver.execute_script(script)print("元素位置:"result)
4. 使用Page Object模式
from selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECclass LoginPage:def __init__(selfdriver):self.driver = driverself.username = (By.ID"username")self.password = (By.ID"password")self.login_btn = (By.ID"login-btn")self.error_msg = (By.CLASS_NAME"error-message")def open(self):self.driver.get("https://example.com/login")return selfdef enter_username(selfusername):self.driver.find_element(*self.username).send_keys(username)return selfdef enter_password(selfpassword):self.driver.find_element(*self.password).send_keys(password)return selfdef click_login(self):self.driver.find_element(*self.login_btn).click()return selfdef get_error_message(self):return WebDriverWait(self.driver5).until(EC.visibility_of_element_located(self.error_msg)).text# 使用示例driver = webdriver.Chrome()login_page = LoginPage(driver).open()login_page.enter_username("test").enter_password("wrong").click_login()print("错误信息:"login_page.get_error_message())driver.quit()

8. 最佳实践

元素定位优先级
  1. ID:唯一且高效

  2. CSS Selectors:灵活高效

  3. XPath:功能强大但较慢

  4. Class Name:适用于多个元素

  5. Tag Name:最不具体

等待策略
# 避免使用固定等待time.sleep(5)  # 不推荐# 使用显式等待from selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECelement = WebDriverWait(driver10).until(EC.element_to_be_clickable((By.ID"dynamic-element")))# 常用等待条件EC.presence_of_element_located# 元素存在EC.visibility_of_element_located# 元素可见EC.element_to_be_clickable# 元素可点击EC.text_to_be_present_in_element# 元素包含特定文本
测试框架集成
# 使用pytestimport pytestfrom selenium import webdriver@pytest.fixture(scope="module")def browser():driver = webdriver.Chrome()driver.implicitly_wait(10)yield driverdriver.quit()def test_homepage_title(browser):browser.get("https://example.com")assert "Example Domain" in browser.titledef test_search_function(browser):browser.get("https://example.com/search")search_box = browser.find_element(By.NAME"q")search_box.send_keys("Selenium")search_box.submit()results = browser.find_elements(By.CSS_SELECTOR".search-result")assert len(results>0

9. 与同类工具对比

特性SeleniumPuppeteerPlaywrightCypress
支持语言Python, Java, C#, JS等JavaScriptJS, Python, C#, JavaJavaScript
浏览器支持Chrome, FF, Edge, SafariChrome, FFChromium, FF, WebKitChrome, FF, Edge
执行速度⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
无头模式支持原生支持原生支持支持
移动端测试通过Appium扩展有限支持良好支持不支持
社区规模⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
学习曲线⭐⭐⭐⭐⭐⭐⭐

10. 企业级应用案例

  1. 谷歌

    • 内部产品自动化测试

    • Gmail、Google Docs等产品兼容性测试

  2. 亚马逊

    • 电商网站功能测试

    • 价格监控和UI验证

  3. Netflix

    • 跨平台播放器UI测试

    • 内容推荐系统验证

  4. 银行系统

    • 网银交易流程自动化测试

    • 安全性和兼容性验证

  5. 政府机构

    • 税务申报系统测试

    • 公共服务网站可访问性测试


总结

Selenium 是 Web 自动化测试领域的行业标准,核心价值在于:

  1. 跨浏览器支持:全面覆盖主流浏览器

  2. 多语言支持:Python, Java, C#, JavaScript等

  3. 强大功能:完整模拟用户操作

  4. 社区生态:丰富的工具链和扩展

技术亮点

  • 基于W3C标准的WebDriver协议

  • 支持真实浏览器环境测试

  • 强大的元素定位和交互能力

  • 与测试框架无缝集成

适用场景

  • Web应用自动化测试

  • 网页数据抓取和监控

  • 重复性网页任务自动化

  • 跨浏览器兼容性测试

  • 网站性能监控

安装使用

pip install selenium==4.0.0

学习资源

  • 官方文档:https://www.selenium.dev/documentation/

  • Selenium Python教程:https://selenium-python.readthedocs.io/

  • 实战项目:https://github.com/SeleniumHQ/selenium/tree/trunk/py/test

截至2023年,Selenium在GitHub收获 27k+ Star,月下载量超 5000万次,是Web自动化领域最广泛使用的工具。项目遵循 Apache 2.0 开源协议,可免费用于商业和非商业项目。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 16:36:26 HTTP/2.0 GET : https://f.mffb.com.cn/a/480448.html
  2. 运行时间 : 0.087744s [ 吞吐率:11.40req/s ] 内存消耗:4,733.55kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=80bdb5bc2bd14f6f44353377bea5aebf
  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.000566s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000829s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000343s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000282s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000540s ]
  6. SELECT * FROM `set` [ RunTime:0.000213s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000563s ]
  8. SELECT * FROM `article` WHERE `id` = 480448 LIMIT 1 [ RunTime:0.002506s ]
  9. UPDATE `article` SET `lasttime` = 1774600586 WHERE `id` = 480448 [ RunTime:0.001333s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000259s ]
  11. SELECT * FROM `article` WHERE `id` < 480448 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000503s ]
  12. SELECT * FROM `article` WHERE `id` > 480448 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.004028s ]
  13. SELECT * FROM `article` WHERE `id` < 480448 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000721s ]
  14. SELECT * FROM `article` WHERE `id` < 480448 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001409s ]
  15. SELECT * FROM `article` WHERE `id` < 480448 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002719s ]
0.089431s