当前位置:首页>Linux>Linux input子系统框架

Linux input子系统框架

  • 2026-03-14 15:55:53
Linux input子系统框架
大家好,我是王鸽,这篇文章是介绍Linux 输入子系统(Input Subsystem),从核心作用、架构组成、工作流程、驱动开发模板四个维度讲解。

一、输入子系统核心作用(先搞懂 “它是干嘛的”)

Linux 输入子系统是内核中专门管理输入设备的框架,核心目标是:

  • 统一各类输入设备的驱动开发接口(键盘、鼠标、触摸屏、按键、摇杆、传感器等);
  • 向上层(用户空间)提供标准化的访问方式(/dev/input/eventX节点);
  • 解耦 “硬件驱动” 和 “输入事件处理”,驱动开发者不用关心上层如何处理事件,只需按框架上报事件即可。
简单类比:输入子系统就像一个 “输入设备翻译官”—— 不管是键盘按了 A 键、触摸屏点了 (100,200)、按键按了电源键,驱动只需告诉翻译官 “发生了什么事件”,翻译官会把事件转换成统一格式,交给上层(比如应用程序、GUI)处理。

二、输入子系统核心架构(三层架构,从下到上)

输入子系统分为驱动、核心层、事件处理层,三层分工明确,驱动开发主要关注硬件层:

如上图,最底层的具体设备,比如触摸屏、 按键、 USB 键盘/鼠标等,中间部分属于Linux 内核空间,分为驱动层、核心层和事件层,最上面是用户空间,所有的输入设备以文件的形式供用户应用程序使用。

鼠标移动、键盘按键按下等输入事件都需要通过设备驱动层→核心层→事件处理层→用户空间,层层上报,直到应用程序;

事件处理层和核心层是内核维护人员提供的,作为嵌入式开发工程师是不需要修改,只需要理解和学会使用相关接口,去编写设备驱动层;

以下是各层关键职责:
层级
核心职责
核心数据结构 / 接口
开发者关注
驱动层
1. 初始化硬件(如配置 GPIO 为输入、注册中断);2. 读取硬件状态(如按键是否按下);3. 调用核心层接口上报事件
struct input_dev
input_register_device()
重点关注
核心层
1. 提供驱动注册 / 注销、事件上报的 API;2. 管理输入设备和事件处理层的匹配
struct input_handler
input_core.c
无需关注
事件处理层
1. 注册到核心层,接收事件;2. 创建 /dev/input/eventX 设备节点;3. 将内核事件转发到用户空间
struct input_event
/dev/input/eventX
无需关注

其实输入子系统把各种硬件(键盘、触摸、鼠标、手柄…)的原始数据标准化为事件EV_KEY/EV_ABS/EV_REL/...),通过 handler(如 evdev) 暴露为 /dev/input/eventX 给用户程序。

三个层次之间的关系

1.核心层负责管理事件处理层和设备驱动层;2.设备驱动层的设备可以匹配上多个事件处理层的类别;3.一个事件处理层的类别可以管理有多个设备驱动层的设备;

三、输入子系统核心概念(必须掌握)

1.核心数据结构

相关联的代码位于这些文件kernel/drivers/input/input.c和kernel/include/linux/input.h中

主要是几个核心数据结构体struct input_dev,struct input_handle,struct input_handler, strcut input_event。

  • struct input_dev(输入设备对象)输入设备的核心结构体,驱动需创建并初始化它,向核心层注册;内核中代表一个物理输入设备的结构体,每个输入设备(键盘 / 鼠标)都会被驱动程序创建一个 input_dev 实例。
    核心行为:通过 input_event() 函数向子系统上报输入事件。
struct input_dev {const char *name;	//设备名称const char *phys;	//设备在系统中的物理路径const char *uniq;	//设备唯一识别符struct input_id id;	//设备工D,包含总线ID(PCI 、 USB)、厂商工D,与 input handler 匹配的时会用到unsigned long evbit[BITS_TO_LONGS(EV_CNT)];	//设备支持的事件类型unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];	//设备支持的具体的按键、按钮事件unsigned long relbit[BITS_TO_LONGS(REL_CNT)]; 	//户设备支持的具体的相对坐标事件unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];	//设备支持的具体的绝对坐标事件unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];	//设备支持的具体的混杂事件unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];	//设备支持的具体的LED指示灯事件unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];	//户设备支持的具体的音效事件unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];	//设备支持的具体的力反馈事件unsigned long swbit[BITS_TO_LONGS(SW_CNT)];	//设备支持的具体的开关事件unsigned int keycodemax;	//键盘码表的大小unsigned int keycodesize;	//键盘码表中的元素个数void *keycode;	//设备的键盘码表//下面两个是可选方法,用于配置和获取键盘码表int (*setkeycode)(struct input_dev *dev,			  unsigned int scancode, unsigned int keycode);int (*getkeycode)(struct input_dev *dev,			  unsigned int scancode, unsigned int *keycode);struct ff_device *ff;	//如果设备支持力反馈,则该成员将指向力反馈设备描述结构unsigned int repeat_key;	//保存上一个键值,用于实现软件自动重复按键(用户按住某个键不放)struct timer_list timer;	//用于软件自动重复按键的定时器int sync;		//在上次同步事件(EV_SYNC)发生后没有新事件产生,则被设置为 1 int abs[ABS_CNT];	//用于上报的绝对坐标当前值int rep[REP_MAX + 1];	//记录自动重复按键参数的当前值unsigned long key[BITS_TO_LONGS(KEY_CNT)];		//舍反映设备按键、 按钮的当前状态unsigned long led[BITS_TO_LONGS(LED_CNT)];	//反映设备LED指示灯的当前状态时unsigned long snd[BITS_TO_LONGS(SND_CNT)];	//反映设备音效的当前状态会unsigned long sw[BITS_TO_LONGS(SW_CNT)];	//反映设备开关的当前状态int absmax[ABS_CNT];	//绝对坐标的最大值int absmin[ABS_CNT];	//绝对坐标的最小值int absfuzz[ABS_CNT];	//绝对坐标的噪音值,变化小于该值的一半可忽略该事件int absflat[ABS_CNT];	//摇杆中心位置大小int absres[ABS_CNT];//提供以下4个设备驱动层的操作接口,根据具体的设备需求实现它们int (*open)(struct input_dev *dev);void (*close)(struct input_dev *dev);int (*flush)(struct input_dev *dev, struct file *file);//用于处理送到设备驱动层来的事件,很多事件在事件处理层被处理,但有的事件仍需送到设备驱动中.//如LED指示灯事件和音效事件,因为这些操作通常需要设备驱动执行(如点亮某个键盘指示灯) int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);//指向独占该设备的输入句柄( input handle ),通常设备驱动上报的事件会被分发到与设备//关联的所有事件处理程序( input handler )中处理,但如果通过ioctl 的EVIOCGRAB命令//设置了独占句柄,则上报事件只能被所设置的输入句柄对应的事件处理程序处理struct input_handle *grab;spinlock_t event_lock;	//调用 event () 时需要使用该自旋锁来实现互斥struct mutex mutex;	//用于串行化的访问 open()、 close()和flush()等设备方法//记录输入事件处理程序(input handlers)调用设备open()方法的次数.保证设备open()方法是在//第一次调用 input_open_device()中被调用,设备close()方法在最后一次调用 input_close_device()中被调用unsigned int users;bool going_away;struct device dev;  //内嵌device结构struct list_head	h_list;	//与该设备相关的输入句柄列表(struct input handle)struct list_head	node;	//挂接到input_dev_list链表上};#define to_input_dev(d) container_of(d, struct input_dev, dev)
struct input_handler(输入事件处理者)抽象的表示一个事件处理驱动,在内核启动过程中会向核心层注册handler;定义 connect/disconnect/event 回调与匹配表 id_table
核心行为:当找到匹配的 input_dev 时,通过 connect() 建立关联,并重写 event() 处理设备上报的事件。
struct input_handler {void *private//由具体的事件处理程序指定的私有数据//用于处理送到事件处理层的事件,该方法由核心层调用,调用时已经禁止了中断,//并获得dev->event lock ,因此不能喔珉void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);bool (*match)(struct input_handler *handler, struct input_dev *dev);//在事件处理程序关联到一个输入设备时调用int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);//在事件处理程序脱离与之关联的输入设备时调void (*disconnect)(struct input_handle *handle);//开启对给定句柄的处理程序。 该函数由核心层在connect ()方法被调用之后,//或者在独占句柄释放它占有的输入设备时调void (*start)(struct input_handle *handle);const struct file_operations *fops; //该事件处理驱动的文件操作集合int minor;	//该驱动能够提供的32个连续次设备号中的第一个const char *name;	//该处理程序的名称.可 以在/ proc/bus/input/handlers 中看到//输入设备 ID衰,事件处理驱动通过这个成员来匹配它能处理的设备const struct input_device_id *id_table;//输入设备ID黑名单.即使在id_table 匹配的设备.只要出现在这个黑名单中,也应该被忽略const struct input_device_id *blacklist;struct list_head	h_list;	//该事件处理程序关联的输入句柄列struct list_head	node;	//所有有事件处理驱动都会通过该成员连接到 input_handler_list链表上};

struct input_handle(输入句柄)用于记录匹配上的设备和事件处理驱动,在设备上报输入事件时才知道该往哪些事件处理驱动上报;

struct input_handle {void *private//由事件处理程序指定的私有数据int open;	//记录句柄打开的次数 const char *name;	//处理程序创建该句柄时,指定的句柄名称*struct input_dev *dev;	//该句柄关联的输入设备struct input_handler *handler; //句柄关联的事件处理程序struct list_head	d_node;	//通过它将该句柄放到与之关联的设备的输入句柄列表中struct list_head	h_node;	//通过它将该句柄放到与之关联的处理程序的输入句柄列表中};

struct input_handle 连接 input_dev 和 input_handler 的 “中间枢纽”,是两者的双向引用载体

核心作用:

  • 每个成功匹配的 input_dev 和 input_handler 都会对应一个 input_handle

  • input_dev中维护了一个h_list 链表,存放所有关联到它的 input_handle
  • input_handler 中维护了一个 h_list 链表,存放所有关联到它的 input_handle
  • 事件传递时,input_dev 通过 h_list 找到对应的 input_handle,再通过 input_handle 找到 input_handler,最终调用 input_handler 的 event() 处理事件。

input_dev,input_handler,input_handle 三者的关系:

  • input_dev是输入事件的 “生产者”,对应物理输入设备;input_handler 是事件的 “消费者”,对应事件处理逻辑;
  • input_handle是连接两者的 “桥梁”,通过双向指针和链表,让生产者和消费者建立唯一关联;
  • 三者的核心交互逻辑是:input_dev 产生事件 → 通过 input_handle 找到匹配的 input_handler → input_handler 处理事件并传递到用户层。
还有下图:

言简意赅点:input_dev 卖家 ,input_handle 快递小哥,    input_handler买家或者到快递站。

struct input_event (UAPI:include/uapi/linux/input.h):用户空间读到的事件结构:

struct input_event {    struct timeval time;   /* 时间戳 */    __u16 type;            /* EV_* */    __u16 code;            /* KEY_* / ABS_* / REL_* / ... */    __s32 value;           /* 值 */};

2. 输入事件类型(统一的事件格式)

所有输入设备的事件都被抽象为以下核心类型(定义在linux/input.h):

事件类型
宏定义
说明
同步事件
EV_SYN
标记一组事件的结束(必填)
按键 / 按钮事件
EV_KEY
键盘按键、物理按键等
相对坐标事件
EV_REL
鼠标移动(相对位移)
绝对坐标事件
EV_ABS
触摸屏、摇杆(绝对坐标)
开关事件
EV_SW
滑动开关、霍尔传感器等

每个事件包含:类型(type) + 编码(code) + 值(value),比如:

  • 按键按下:type=EV_KEY, code=KEY_0, value=1
  • 按键松开:type=EV_KEY, code=KEY_0, value=0
  • 触摸屏点击:type=EV_ABS, code=ABS_X, value=100(X 坐标) + type=EV_ABS, code=ABS_Y, value=200(Y 坐标) + type=EV_SYN, code=SYN_REPORT, value=0(同步)。
3. 事件上报 API(驱动核心调用)
函数
作用
核心注意事项
input_allocate_device()
分配 input_dev 结构体
失败返回 NULL,需检查
set_bit(EV_KEY, dev->evbit)
声明设备支持的事件类型
必须先声明,否则上报事件无效
set_bit(KEY_0, dev->keybit)
声明支持的具体按键码
需与硬件实际按键对应
input_register_device()
注册 input_dev 到核心层
注册前必须完成所有配置
input_event(dev, type, code, value)
上报输入事件
type=EV_KEY/ABS 等,value=1(按下)/0(松开)
input_sync(dev)
上报同步事件
每组事件最后必须调用,否则应用层收不到
input_unregister_device()
注销 input_dev
退出时先注销,再释放
input_free_device()
释放 input_dev 内存
注销后再释放,避免野指针
  1. 四、举一个例子

  2. 一个输入事件(如按键按下)的典型旅程如下:

    1. 硬件中断:用户操作触发硬件中断。
    2. 驱动上报:设备驱动层的中断处理函数读取硬件状态,并调用 
    "input_report_key()" 等函数生成事件。
    3. 核心处理:核心层接收事件,进行必要的过滤和验证。
    4. 事件分发:核心层将事件分发给所有已注册的、匹配的事件处理器(Handler)。
    5. 用户空间读取:用户空间应用程序(如GUI系统)通过读取 
    "/dev/input/eventX" 获取事件数据。
核心流程
分配input_dev → 配置事件类型/按键码 → 注册input_dev → 上报事件(input_event+input_sync) → 注销+释放

(1)设备驱动层核心代码(以简单按键为例)

步骤大概如下:

  • 调用 input_allocate_device() 分配 input_dev 内存;

  • 设置 input_dev 的核心属性:

  • 注册设备:调用 "input_register_device(dev)" 将设备注册到子系统。

  • 上报事件:在适当的时候(如中断处理函数中)上报事件:input_report_key(dev, KEY_A, 1); // 报告KEY_A按下,input_sync(dev); // 标记事件报告完成

#include<linux/input.h>#include<linux/interrupt.h>#include<linux/module.h>// 定义按键GPIO和中断号#define KEY_GPIO    GPIOA(0)#define KEY_IRQ     gpio_to_irq(KEY_GPIO)// 全局变量:input_dev结构体指针,保存分配的设备描述符static struct input_dev *key_input_dev;// 中断处理函数:按键触发时上报事件staticirqreturn_tkey_irq_handler(int irq, void *dev_id){    int key_val = gpio_get_value(KEY_GPIO); // 读取按键电平(0/1)    // 上报按键事件:KEY_0为按键码,!key_val表示按下/释放(低电平按下)    input_report_key(key_input_dev, KEY_0, !key_val);    input_sync(key_input_dev); // 同步事件(表示一组事件结束)    return IRQ_HANDLED;}// 驱动初始化函数staticint __init key_input_init(void){    int ret;    // 1. 分配input_dev    key_input_dev = input_allocate_device();    if (!key_input_dev) {        return -ENOMEM;    }    // 2. 配置input_dev:声明支持的事件类型和按键    __set_bit(EV_KEY, key_input_dev->evbit); // 支持按键事件    __set_bit(KEY_0, key_input_dev->keybit); // 支持KEY_0按键    // 可选配置:设备名称、物理路径(便于系统识别)    key_input_dev->name = "simulate_key_device"// 设备名    key_input_dev->phys = "simulate_key/input0"// 物理路径                // 3. 注册input_dev到核心层    ret = input_register_device(key_input_dev);    if (ret) {        input_free_device(key_input_dev);        return ret;    }    // 4. 申请GPIO和中断(下降沿触发)    ret = request_irq(KEY_IRQ, key_irq_handler, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,                      "key_input"NULL);    if (ret) {        input_unregister_device(key_input_dev);        input_free_device(key_input_dev);        return ret;    }    return 0;}// 驱动退出函数staticvoid __exit key_input_exit(void){    free_irq(KEY_IRQ, NULL);    input_unregister_device(key_input_dev);    input_free_device(key_input_dev);}module_init(key_input_init);module_exit(key_input_exit);MODULE_LICENSE("GPL");

编译驱动(Makefile)

obj-m += key_input.oKERNELDIR ?= /lib/modules/$(shell uname -r)/buildPWD := $(shell pwd)all:    make -C $(KERNELDIR) M=$(PWD) modulesclean:    make -C $(KERNELDIR) M=$(PWD) clean

加载驱动

insmod key_input.ko # 加载驱动ls /dev/input/      # 查看输入设备(新增的eventX即为驱动创建的设备)cat /proc/bus/input/devices # 查看设备详情(能看到simulate_key_device)

用户空间读取事件示例

#include<stdio.h>#include<fcntl.h>#include<unistd.h>#include<linux/input.h>intmain(){    int fd = open("/dev/input/event0", O_RDONLY);    if (fd < 0) {        perror("open failed");        return -1;    }    struct input_event ev;    while (1) {        // 读取事件(阻塞)        ssize_t len = read(fd, &ev, sizeof(ev));        if (len != sizeof(ev)) continue;        // 解析事件:EV_KEY表示按键事件        if (ev.type == EV_KEY && ev.code == KEY_0) {            printf("KEY_0 %s (time: %ld.%06ld)\n",                   ev.value ? "pressed" : "released",                   ev.time.tv_sec, ev.time.tv_usec);        }    }    close(fd);    return 0;}

关键要点

  • 上报事件必须以input_sync()结尾,否则应用层无法识别;

  • 注册前必须完成所有事件类型 / 按键码的配置;

  • 资源释放要遵循 “先注销、后释放” 的顺序;

事件上报是核心动作,必须遵循 “上报具体事件 + 同步事件” 的规范,硬件触发优先使用中断方式(效率更高)。

代码调用图

总结

分层核心
Linux 输入子系统分为设备驱动层(硬件适配)、核心层(事件中转)、事件处理层(用户交互),三层通过input_dev/input_handler/input_handle关联,解耦硬件和应用。
核心流程
驱动注册input_dev → 核心层匹配事件处理器 → 硬件触发中断后驱动上报事件 → 事件处理层通过/dev/input/eventX向用户空间暴露事件。
关键接口
驱动核心函数是:
input_allocate_device()/input_register_device()/input_report_key()
用户层通过读取struct input_event 解析事件。
谢谢点赞阅读收藏!

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 19:19:22 HTTP/2.0 GET : https://f.mffb.com.cn/a/480084.html
  2. 运行时间 : 0.185494s [ 吞吐率:5.39req/s ] 内存消耗:4,594.30kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=f1bab5dbebc82032a81e198f6a08d0aa
  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.000712s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000693s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000295s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.001673s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000574s ]
  6. SELECT * FROM `set` [ RunTime:0.007267s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000834s ]
  8. SELECT * FROM `article` WHERE `id` = 480084 LIMIT 1 [ RunTime:0.000728s ]
  9. UPDATE `article` SET `lasttime` = 1774610362 WHERE `id` = 480084 [ RunTime:0.013383s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000469s ]
  11. SELECT * FROM `article` WHERE `id` < 480084 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.003432s ]
  12. SELECT * FROM `article` WHERE `id` > 480084 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000998s ]
  13. SELECT * FROM `article` WHERE `id` < 480084 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001299s ]
  14. SELECT * FROM `article` WHERE `id` < 480084 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.011781s ]
  15. SELECT * FROM `article` WHERE `id` < 480084 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.002099s ]
0.187062s