当前位置:首页>php>PHP PWN——前置基础

PHP PWN——前置基础

  • 2026-02-09 22:24:28
PHP PWN——前置基础

PHP PWN

简介

PHP是一门基于C语言编写的高级语言,历史悠久。它支持使用C语言编写可直接用于PHP文件的二进制.so库文件。PHP PWN考的还是用户态PWN,具体而言,赛题一般使用的都是使用C语言编写的PHP扩展库文件,需要发现扩展库里的漏洞,进行利用。

环境搭建

  1. 使用php docker容器 php:8.3-apache
  2. 进入/urs/src/,php 8.3的源码在压缩包里,解压
  3. 源码目录下的ext目录有个ext_skrl.php,我需要利用他来构建php扩展的基础文件。
  4. 使用其 --ext 和--dir选项。
    • --ext 用来指定php扩展的名字。
    • --dir 设置php扩展基础文件生成的目录。
    • --onlyunix只生成适用于Unix/Linux系统的扩展代码,不包含Windows相关的支持。
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineroot@b993cb0f9752:/var/www/php-8.3.28/ext# ./ext_skel.php --dir /var/www/myphpext/ --ext hello_phpext --onlyunixCopying config scripts... doneCopying sources... doneCopying tests... doneSuccess. The extension is now ready to be compiled. To do so, use thefollowing steps:cd /var/www/myphpext/hello_phpextphpize./configuremakeDon't forget to run tests once the compilation is done:make testThank you for using PHP!
  1. 完成搭建
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineroot@b993cb0f9752:/var/www/myphpext/hello_phpext# ls -ltotal 28-rw-r--r-- 1 root root 3490 Nov 22 08:30 config.m4-rw-r--r-- 1 root root  253 Nov 22 08:30 config.w32-rw-r--r-- 1 root root 1968 Nov 22 08:40 hello_phpext.c-rw-r--r-- 1 root root  133 Nov 22 08:30 hello_phpext.stub.php-rw-r--r-- 1 root root  558 Nov 22 08:30 hello_phpext_arginfo.h-rw-r--r-- 1 root root  372 Nov 22 08:30 php_hello_phpext.hdrwxr-xr-x 2 root root 4096 Nov 22 08:30 tests

扩展构建及加载

现在我们要构建扩展和将扩展加载到PHP中。

通过下面的命令可以完成扩展加载:

ounter(lineounter(lineounter(lineounter(linephpize./configuremakemake install

执行上述命令后,我们的PHP扩展库文件就被复制到了/usr/local/lib/php/extensions/no-debug-non-zts-20230831/ 目录中。

ounter(lineounter(lineroot@7207566d19d8:/var/www# ls /usr/local/lib/php/extensions/no-debug-non-zts-20230831/hello_phpext.so  opcache.so  sodium.so

随后,我们还需要创建扩展文件。在·8.3版本的PHP中,通过php --ini查找拓展文件目录。

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineroot@7207566d19d8:/var/www/myphpext/hello_phpext# php --iniConfiguration File (php.ini) Path/usr/local/etc/phpLoaded Configuration File:         (none)Scan for additional .ini files in: /usr/local/etc/php/conf.dAdditional .ini files parsed:      /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini,/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini

创建配置文件。

ounter(lineecho "extension=hello_phpext.so" > /usr/local/etc/php/conf.d/docker-php-ext-hello_phpext.ini

或者直接执行命令执行。

ounter(linephp -d extension=./modules/easy_phppwn.so  test.php

重启apache2服务,即可将我们的扩展加载到PHP中。

在php中调用我们的扩展里的函数。

ounter(line<?php test1()?>

这里的test1()对应,hello_phpext.c中的这段代码:

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* {{{ void test1() */PHP_FUNCTION(test1){        ZEND_PARSE_PARAMETERS_NONE();        php_printf("The extension %s is loaded and working!\r\n""hello_phpext");}/* }}} */

关键结构定义

hello_phpext.c

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* hello_phpext extension for PHP */#ifdef HAVE_CONFIG_Hinclude"config.h"#endif#include"php.h"#include"ext/standard/info.h"#include"php_hello_phpext.h"#include"hello_phpext_arginfo.h"/* For compatibility with older PHP versions */#ifndef ZEND_PARSE_PARAMETERS_NONE#define ZEND_PARSE_PARAMETERS_NONE() \        ZEND_PARSE_PARAMETERS_START(0, 0) \        ZEND_PARSE_PARAMETERS_END()#endif/* {{{ void test1() */PHP_FUNCTION(test1){        ZEND_PARSE_PARAMETERS_NONE();        php_printf("The extension %s is loaded and working!\r\n""hello_phpext");}/* }}} *//* {{{ string test2( [ string $var ] ) */PHP_FUNCTION(test2){        char *var = "World";        size_t var_len = sizeof("World") - 1;        zend_string *retval;        ZEND_PARSE_PARAMETERS_START(01)                Z_PARAM_OPTIONAL                Z_PARAM_STRING(var, var_len)        ZEND_PARSE_PARAMETERS_END();        retval = strpprintf(0"Hello %s", var);        RETURN_STR(retval);}/* }}}*//* {{{ PHP_RINIT_FUNCTION */PHP_RINIT_FUNCTION(hello_phpext){#if defined(ZTS) && defined(COMPILE_DL_HELLO_PHPEXT)        ZEND_TSRMLS_CACHE_UPDATE();#endif        return SUCCESS;}/* }}} *//* {{{ PHP_MINFO_FUNCTION */PHP_MINFO_FUNCTION(hello_phpext){        php_info_print_table_start();        php_info_print_table_row(2"hello_phpext support""enabled");        php_info_print_table_end();}/* }}} *//* {{{ hello_phpext_module_entry */zend_module_entry hello_phpext_module_entry = {        STANDARD_MODULE_HEADER,        "hello_phpext",                                 /* Extension name */        ext_functions,                                  /* zend_function_entry */        NULL,                                                   /* PHP_MINIT - Module initialization */        NULL,                                                   /* PHP_MSHUTDOWN - Module shutdown */        PHP_RINIT(hello_phpext),                        /* PHP_RINIT - Request initialization */        NULL,                                                   /* PHP_RSHUTDOWN - Request shutdown */        PHP_MINFO(hello_phpext),                        /* PHP_MINFO - Module info */        PHP_HELLO_PHPEXT_VERSION,               /* Version */        STANDARD_MODULE_PROPERTIES};/* }}} */#ifdef COMPILE_DL_HELLO_PHPEXTifdef ZTSZEND_TSRMLS_CACHE_DEFINE()endifZEND_GET_MODULE(hello_phpext)#endif

头文件包含部分

ounter(lineounter(lineounter(line#ifdef HAVE_CONFIG_H#include"config.h"#endif
  • 如果定义了 HAVE_CONFIG_H 宏,则包含 config.h 配置文件
  • 这是PHP扩展的标准配置检查
ounter(lineounter(lineounter(lineounter(line#include"php.h"#include"ext/standard/info.h"#include"php_hello_phpext.h"#include"hello_phpext_arginfo.h"
  • 包含必要的头文件:
    • php.h:PHP核心头文件,提供PHP扩展API
    • ext/standard/info.h:PHP信息函数头文件
    • php_hello_phpext.h:扩展的自定义头文件
    • hello_phpext_arginfo.h:参数信息头文件(自动生成)

函数定义部分

test1 函数
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* {{{ void test1() */PHP_FUNCTION(test1){        ZEND_PARSE_PARAMETERS_NONE();        php_printf("The extension %s is loaded and working!\r\n""hello_phpext");}/* }}} */
  • PHP_FUNCTION(test1):定义PHP函数 test1
  • ZEND_PARSE_PARAMETERS_NONE():确保函数不接受任何参数
  • php_printf():输出格式化字符串到PHP输出流
  • 这个函数没有返回值(void类型)
test2 函数
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* {{{ string test2( [ string $var ] ) */PHP_FUNCTION(test2){        char *var = "World";        size_t var_len = sizeof("World") - 1;        zend_string *retval;        ZEND_PARSE_PARAMETERS_START(01)                Z_PARAM_OPTIONAL                Z_PARAM_STRING(var, var_len)        ZEND_PARSE_PARAMETERS_END();        retval = strpprintf(0"Hello %s"var);        RETURN_STR(retval);}/* }}}*/
  • 定义PHP函数 test2,返回字符串类型
  • 设置默认参数值:var = "World"var_len 是字符串长度
  • ZEND_PARSE_PARAMETERS_START(0, 1):定义参数范围(0-1个参数)
  • Z_PARAM_OPTIONAL:参数是可选的
  • Z_PARAM_STRING(var, var_len):解析字符串参数
  • strpprintf(0, "Hello %s", var):创建格式化字符串
  • RETURN_STR(retval):返回字符串结果
PHP_FUNCTION

定义PHP库函数的宏定义,php8.3源码

ounter(lineounter(lineounter(lineounter(line// Zend/zend_API.h, line 71#define ZEND_NAMED_FUNCTION(name)		void ZEND_FASTCALL name(INTERNAL_FUNCTION_PARAMETERS)#define ZEND_FUNCTION(name)				ZEND_NAMED_FUNCTION(zif_##name)

PHP_FUNCTION(test1)相当于void ZEND_FASTCALL test1(INTERNAL_FUNCTION_PARAMETERS)

INTERNAL_FUNCTION_PARAMETERS
ounter(lineounter(lineounter(line// Zend/zend.h, line 49#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
zend_execute_data 结构体

用于跟踪 PHP 代码执行时的函数上下文信息,相当于stack。

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line// /Zend/zend_types.h, line 91typedef struct _zend_execute_data    zend_execute_data;// Zend/compile.h, line 544#define EX(element)             ((execute_data)->element)//zend_compile.hstruct _zend_execute_data {    const zend_op       *opline;  //指向当前执行的opcode,初始时指向zend_op_array起始位置    zend_execute_data   *call;             /* current call                   */    zval                *return_value;  //返回值指针    zend_function       *func;          //当前执行的函数(非函数调用时为空)    zval                 This;          //这个值并不仅仅是面向对象的this,还有另外两个值也通过这个记录:call_info + num_args,分别存在zval.u1.reserved、zval.u2.num_args    zend_class_entry    *called_scope;  //当前call的类    zend_execute_data   *prev_execute_data; //函数调用时指向调用位置作用空间    zend_array          *symbol_table; //全局变量符号表#if ZEND_EX_USE_RUN_TIME_CACHE    void               **run_time_cache;   /* cache op_array->run_time_cache */#endif#if ZEND_EX_USE_LITERALS    zval                *literals;  //字面量数组,与func.op_array->literals相同#endif};
zval 结构体

PHP使用zend_value定义PHP数据类型,包括整数、浮点数、数组、对象、函数、类等。变量有两个组成部分:变量名、变量值,PHP中可以将其对应为:zval、zend_value,这两个概念一定要区分开,PHP中变量的内存是通过引用计数进行管理的,引用计数是在zend_value而不是zval上,变量之间的传递、赋值通常也是针对zend_value。

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line// /Zend/zend_types.h, line 93 typedef struct _zval_struct     zval;typedef union _zend_value {    zend_long         lval;    //int整形    double            dval;    //浮点型    zend_refcounted  *counted;    zend_string      *str;     //string字符串    zend_array       *arr;     //array数组    zend_object      *obj;     //object对象    zend_resource    *res;     //resource资源类型    zend_reference   *ref;     //引用类型,通过&$var_name定义的    zend_ast_ref     *ast;     //下面几个都是内核使用的value    zval             *zv;    void             *ptr;    zend_class_entry *ce;    zend_function    *func;    struct {        uint32_t w1;        uint32_t w2;    } ww;} zend_value;struct _zval_struct {    zend_value        value; //变量实际的value    union {        struct {            ZEND_ENDIAN_LOHI_4//这个是为了兼容大小字节序,小字节序就是下面的顺序,大字节序则下面4个顺序翻转                zend_uchar    type,         //变量类型                zend_uchar    type_flags,  //类型掩码,不同的类型会有不同的几种属性,内存管理会用到                zend_uchar    const_flags,                zend_uchar    reserved)     //call info,zend执行流程会用到        } v;        uint32_t type_info; //上面4个值的组合值,可以直接根据type_info取到4个对应位置的值    } u1;    union {        uint32_t     var_flags;        uint32_t     next;                 //哈希表中解决哈希冲突时用到        uint32_t     cache_slot;           /* literal cache slot */        uint32_t     lineno;               /* line number (for ast nodes) */        uint32_t     num_args;             /* arguments number for EX(This) */        uint32_t     fe_pos;               /* foreach position */        uint32_t     fe_iter_idx;          /* foreach iterator index */    } u2; //一些辅助值};

zval结构比较简单,内嵌一个union类型的zend_value保存具体变量类型的值或指针,zval中还有两个union:u1u2:

  • u1: 它的意义比较直观,变量的类型就通过u1.v.type区分,另外一个值type_flags为类型掩码,在变量的内存管理、gc机制中会用到,第三部分会详细分析,至于后面两个const_flagsreserved暂且不管
  • u2: 这个值纯粹是个辅助值,假如zval只有:valueu1两个值,整个zval的大小也会对齐到16byte,既然不管有没有u2大小都是16byte,把多余的4byte拿出来用于一些特殊用途还是很划算的,比如next在哈希表解决哈希冲突时会用到,还有fe_pos在foreach会用到……

zend_value可以看出,除longdouble类型直接存储值外,其它类型都为指针,指向各自的结构。

类型

zval.u1.type类型:

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* regular data types */#define IS_UNDEF                    0#define IS_NULL                     1#define IS_FALSE                    2#define IS_TRUE                     3#define IS_LONG                     4#define IS_DOUBLE                   5#define IS_STRING                   6#define IS_ARRAY                    7#define IS_OBJECT                   8#define IS_RESOURCE                 9#define IS_REFERENCE                10/* constant expressions */#define IS_CONSTANT                 11#define IS_CONSTANT_AST             12/* fake types */#define _IS_BOOL                    13#define IS_CALLABLE                 14/* internal types */#define IS_INDIRECT                 15#define IS_PTR                      17
字符串

PHP中字符串通过zend_string表示:

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(linestruct _zend_string {    zend_refcounted_h gc;    zend_ulong        h;                /* hash value */`    size_t            len;    char              val[1];};
  • gc: 变量引用信息,比如当前value的引用数,所有用到引用计数的变量类型都会有这个结构,3.1节会详细分析
  • h: 哈希值,数组中计算索引时会用到
  • len: 字符串长度,通过这个值保证二进制安全
  • val: 字符串内容,变长struct,分配时按len长度申请内存

事实上字符串又可具体分为几类:IS_STR_PERSISTENT(通过malloc分配的)、IS_STR_INTERNED(php代码里写的一些字面量,比如函数名、变量值)、IS_STR_PERMANENT(永久值,生命周期大于request)、IS_STR_CONSTANT(常量)、IS_STR_CONSTANT_UNQUALIFIED,这个信息通过flag保存:zval.value->gc.u.flags,后面用到的时候再具体分析。

模块生命周期函数

请求初始化函数
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* {{{ PHP_RINIT_FUNCTION */PHP_RINIT_FUNCTION(hello_phpext){#if defined(ZTS) && defined(COMPILE_DL_HELLO_PHPEXT)        ZEND_TSRMLS_CACHE_UPDATE();#endif        return SUCCESS;}/* }}} */
  • 每个请求开始时调用的函数
  • ZTS 检查:如果是线程安全模式且动态编译,更新线程本地存储缓存
  • 返回 SUCCESS 表示初始化成功
模块信息函数
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* {{{ PHP_MINFO_FUNCTION */PHP_MINFO_FUNCTION(hello_phpext){        php_info_print_table_start();        php_info_print_table_row(2"hello_phpext support""enabled");        php_info_print_table_end();}/* }}} */
  • 在 phpinfo() 页面显示扩展信息
  • 创建表格,显示扩展支持状态为 "enabled"

模块入口定义

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* {{{ hello_phpext_module_entry */zend_module_entry hello_phpext_module_entry = {        STANDARD_MODULE_HEADER,        "hello_phpext",                                 /* Extension name */        ext_functions,                                  /* zend_function_entry */        NULL,                                                   /* PHP_MINIT - Module initialization */        NULL,                                                   /* PHP_MSHUTDOWN - Module shutdown */        PHP_RINIT(hello_phpext),                        /* PHP_RINIT - Request initialization */        NULL,                                                   /* PHP_RSHUTDOWN - Request shutdown */        PHP_MINFO(hello_phpext),                        /* PHP_MINFO - Module info */        PHP_HELLO_PHPEXT_VERSION,               /* Version */        STANDARD_MODULE_PROPERTIES};/* }}} */

这是最重要的部分,定义了扩展模块的结构:

  • STANDARD_MODULE_HEADER:标准模块头部信息
  • "hello_phpext":扩展名称
  • ext_functions:函数列表(在arginfo.h中定义)
  • NULL:模块初始化函数(未使用)
  • NULL:模块关闭函数(未使用)
  • PHP_RINIT(hello_phpext):请求初始化函数
  • NULL:请求关闭函数(未使用)
  • PHP_MINFO(hello_phpext):模块信息函数
  • PHP_HELLO_PHPEXT_VERSION:扩展版本号
  • STANDARD_MODULE_PROPERTIES:标准模块属性

动态加载支持

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(line#ifdef COMPILE_DL_HELLO_PHPEXTifdef ZTSZEND_TSRMLS_CACHE_DEFINE()endifZEND_GET_MODULE(hello_phpext)#endif
  • 如果是动态编译的扩展:
    • 在ZTS(线程安全)模式下定义线程本地存储
    • ZEND_GET_MODULE(hello_phpext):注册模块获取函数

这个扩展提供了两个简单的PHP函数:

  1. test1() - 显示扩展工作状态
  2. test2([$str]) - 返回 "Hello $str" 字符串,默认 "Hello World"

hello_phpext_arginfo.h

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line/* This is a generated file, edit the .stub.php file instead. * Stub hash: 54b0ffc3af871b189435266df516f7575c1b9675 */ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test1, 00IS_VOID0)ZEND_END_ARG_INFO()ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_test2, 00IS_STRING0)        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, str, IS_STRING0"\"\"")ZEND_END_ARG_INFO()ZEND_FUNCTION(test1);ZEND_FUNCTION(test2);static const zend_function_entry ext_functions[] = {        ZEND_FE(test1, arginfo_test1)        ZEND_FE(test2, arginfo_test2)        ZEND_FE_END};

static const zend_function_entry ext_functions[]

其中即保存了本扩展中导出的,可在PHP代码中直接调用的函数。

函数参数解析

之前我们定义的函数没有接收任何参数,那么扩展定义的内部函数如何读取参数呢?首先回顾下函数参数的实现:用户自定义函数在编译时会为每个参数创建一个zend_arg_info结构,这个结构用来记录参数的名称、是否引用传参、是否为可变参数等,在存储上函数参数与局部变量相同,都分配在zend_execute_data上,且最先分配的就是函数参数,调用函数时首先会进行参数传递,按参数次序依次将参数的value从调用空间传递到被调函数的zend_execute_data,函数内部像访问普通局部变量一样通过存储位置访问参数,这是用户自定义函数的参数实现。

内部函数与用户自定义函数最大的不同在于内部函数就是一个普通的C函数,除函数参数以外在zend_execute_data上没有其他变量的分配,函数参数是从PHP用户空间传到函数的,它们与用户自定义函数完全相同,包括参数的分配方式、传参过程,也是按照参数次序依次分配在zend_execute_data上,所以在扩展中定义的函数直接按照顺序从zend_execute_data上读取对应的值即可,PHP中通过zend_parse_parameters()这个函数解析zend_execute_data上保存的参数:

ounter(linezend_parse_parameters(int num_args, constchar *type_spec, ...);
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(linePHP_FUNCTION(my_func_1){    zend_long   lval;    zval        *arr;    if(zend_parse_parameters(ZEND_NUM_ARGS(), "la", &lval, &arr) == FAILURE){        RETURN_FALSE;    }    ...}

对应的内存关系:

注意:解析时除了整形、浮点型、布尔型是直接硬拷贝value外,其它解析到的变量只能是指针,arr为zend_execute_data上param_1的地址,即:zval *arr = &param_1,也就是说参数始终存储在zend_execute_data上,解析获取的是这些参数的地址。zend_parse_parameters()调用了zend_parse_va_args()进行处理,简单看下解析过程:

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line//va就是定义的要解析到的各个变量的地址staticintzend_parse_va_args(int num_args, constchar *type_spec, va_list *va, int flags){    const  char *spec_walk;    int min_num_args = -1//最少参数数    int max_num_args = 0//要解析的参数总数    int post_varargs = 0;    zval *arg;    int arg_count; //实际传参数    //遍历type_spec计算出min_num_args、max_num_args    for (spec_walk = type_spec; *spec_walk; spec_walk++) {        ...    }    ...    //检查数目是否合法    if (num_args < min_num_args || (num_args > max_num_args && max_num_args >= 0)) {        ...    }    //获取实际传参数:zend_execute_data.This.u2.num_args    arg_count = ZEND_CALL_NUM_ARGS(EG(current_execute_data));    ...    i = 0;    //逐个解析参数    while (num_args-- > 0) {        ...        //获取第i个参数的zval地址:arg就是在zend_execute_data上分配的局部变量        arg = ZEND_CALL_ARG(EG(current_execute_data), i + 1);        //解析第i个参数        if (zend_parse_arg(i+1, arg, va, &type_spec, flags) == FAILURE) {            if (varargs && *varargs) {                *varargs = NULL;            }            return FAILURE;        }        i++;    }}

欢迎师傅们加入我们:

纳新群1:222328705

纳新群2:346014666

有兴趣的师傅欢迎一起来讨论!

PS:团队纳新简历投递邮箱:xmcve@qq.com

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-10 03:11:18 HTTP/2.0 GET : https://f.mffb.com.cn/a/474654.html
  2. 运行时间 : 9.139175s [ 吞吐率:0.11req/s ] 内存消耗:4,696.56kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=c0f82185901b4deaa6fbb50726a608fc
  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.001050s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001444s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.101297s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.101272s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001803s ]
  6. SELECT * FROM `set` [ RunTime:0.101161s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001614s ]
  8. SELECT * FROM `article` WHERE `id` = 474654 LIMIT 1 [ RunTime:0.101429s ]
  9. UPDATE `article` SET `lasttime` = 1770664279 WHERE `id` = 474654 [ RunTime:2.422618s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.041396s ]
  11. SELECT * FROM `article` WHERE `id` < 474654 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.013724s ]
  12. SELECT * FROM `article` WHERE `id` > 474654 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.037132s ]
  13. SELECT * FROM `article` WHERE `id` < 474654 ORDER BY `id` DESC LIMIT 10 [ RunTime:5.966660s ]
  14. SELECT * FROM `article` WHERE `id` < 474654 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.060706s ]
  15. SELECT * FROM `article` WHERE `id` < 474654 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.096588s ]
9.143874s