当前位置:首页>Linux>Linux Bash Shell 探究

Linux Bash Shell 探究

  • 2026-07-02 16:41:57
Linux Bash Shell 探究
本篇文章参考自:
https://mp.weixin.qq.com/s/rmUXqYulX3pyrNfINk90WQhttps://ixyzero.com/blog/archives/2070.htmlhttps://www.maoyingdong.com/what_is_a_login_shell_and_a_non_login_shell/https://www.maoyingdong.com/what_is_a_interactive_shell/https://www.maoyingdong.com/linux_bash_environment_file/
Linux 也算是用了好几年了吧,Shell(主要是 Bash、Zsh)也一直在用,之前其实看到过交互式 Shell、非交互式 Shell、登录 Shell 的内容,但当时什么都不懂,理解也不深,只是脑子里留下了一个印象而已;现在无意中又碰到了这个话题,作为一个知识的奴隶,补充一下这方面的知识。
注:实验环境为 - CentOS 7 - Bash
1 Login & Non-Login
常看到一个概念 Login Shell 或者叫登录 Shell,但很难从名称理解它的含义,从网上也很少找到详细的解释,今天来整理一下 Login Shell 的概念以及如何区分 Login Shell 和 Non-Login Shell。
先来看看平常我们使用 SSH 协议登录 Linux 服务器时的样子:
Connecting to 10.10.8.137:22...Connection established.To escape to local shell, press Ctrl+Alt+].Last login: Wed Oct 18 21:55:30 2023 from 10.10.8.1[root@localhost ~]# 

可以看到有一个 Last login 的时间和 IP,这时有两种命令可以断开 SSH 连接:

  • logout:在用户登录 Shell 会话时,用于安全地注销用户并终止该会话。

  • exit:退出当前 Shell 环境,并返回到上一级 Shell 或关闭终端会话。

[root@localhost ~]# logoutConnection closed.Disconnected from remote host(CentOS 7) at 00:28:31.[root@localhost ~]# exitlogoutConnection closed.Disconnected from remote host(CentOS 7) at 00:28:49.

可以看到两者的具体作用上有细微差别,比如在使用 bash 命令开启一个子 Shell 时,却不能使用 logout 退出,只能使用 exit:

[root@localhost ~]# bash[root@localhost ~]# ps -fUID         PID   PPID  C STIME TTY          TIME CMDroot      52446  52442  0 15:52 pts/1    00:00:00 -bashroot      52486  52446  0 15:52 pts/1    00:00:00 bashroot      52515  52486  0 15:52 pts/1    00:00:00 ps -f[root@localhost ~]# logoutbash: logout: not login shell: use `exit'

这是为什么?很简单,因为 bash 的子 Shell 是一个 Non-login,对于一个非登录 Shell 来说,这个 Shell 没有用户登录又何来用户登出呢。

1.1 Login Shell

在 sudo 命令中有个参数 -i,用于运行一个 Login Shell:

[root@localhost ~]# sudo --help | grep 'login'  -i, --login                   run login shell as the target user; a command may also be specified[root@localhost ~]# sudo -i echo $0-bash

在 su 命令中也有类似的参数:

[root@localhost ~]# su --help | grep 'login' -, -l, --login                  make the shell a login shell[root@localhost ~]# su - centos7Last login: Thu Oct 19 00:37:52 CST 2023 on pts/2[centos7@localhost ~]echo $0-bash

关于 Login Shell 这部分定义,可以从 Bash 手册里看到:

A login shell is one whose first character of argument zero is a -or one started with the --login option.## 登录 Shell 是 &0 的第一个字符是 - 或以 ——login 选项开头的 Shell。

可以看到 - 与--login 两个条件二者取其一。

1.1.1 Login Shell 条件一

先看前面半句:first character of argument zero is a -,即一个 Shell 的 argument zero 的第一个字符是个连字符 -,在这里 argument zero 其实指的是 $0。

注:$0 是 Shell 的一个参数,这个参数保存的是 bash 脚本的名称,bash 初始化的时候会设置 $0 这个变量。

在 bash 中打印一下:

[root@localhost ~]# echo $0-bash

可以看到,打印出来脚本名称是 -bash,第一个字符是 -,说明这个是一个 Login Shell。

使用 ps 命令查看进程,也可以看到 bash 的进程名称为 -bash:

[root@localhost ~]# ps -fUID         PID   PPID  C STIME TTY          TIME CMDroot       5586   5578  0 00:32 pts/2    00:00:00 -bashroot       5957   5586  0 00:43 pts/2    00:00:00 ps -f

如果打印出来第一个字符不是 -,例如:

[root@localhost ~]# bash[root@localhost ~]# ps -fUID         PID   PPID  C STIME TTY          TIME CMDroot       2133   2125  0 20:50 pts/0    00:00:00 -bashroot       2205   2133  0 20:52 pts/0    00:00:00 bashroot       2238   2205  0 20:52 pts/0    00:00:00 ps -f

不过,这也不能说明这不是 Login Shell 还要看后半句。

1.1.2 Login Shell 条件二

Shell 启动的时候有 --login 参数,尝试一下:

[root@localhost ~]# bash --login[root@localhost ~]# ps -fUID         PID   PPID  C STIME TTY          TIME CMDroot       2133   2125  0 20:50 pts/0    00:00:00 -bashroot       2255   2133  0 20:53 pts/0    00:00:00 bash --loginroot       2287   2255  0 20:53 pts/0    00:00:00 ps -f[root@localhost ~]# logout[root@localhost ~]# ps -fUID         PID   PPID  C STIME TTY          TIME CMDroot       2133   2125  0 20:50 pts/0    00:00:00 -bashroot       2288   2133  0 20:54 pts/0    00:00:00 ps -f

可以使用 logout 命令,用 Docker 试一试:

[root@localhost ~]# docker run -it centos:7 /bin/bash --login[root@3341ceb0da2a /]# ps -fUID         PID   PPID  C STIME TTY          TIME CMDroot          1      0  0 12:55 pts/0    00:00:00 /bin/bash --loginroot         19      1  0 12:55 pts/0    00:00:00 ps -f[root@3341ceb0da2a /]# logout[root@localhost ~]

可以看到,如果带上 --login,那它就是一个 Login shell,可以使用 logout 退出 Shell。

1.2 Login & Non-Login 区别

Login Shell(登录 Shell)和 Non-Login Shell(非登录 Shell)是两种不同类型的 Shell 环境,它们在启动时加载的配置文件以及行为方面存在一些区别。

Login Shell(登录 Shell):

  • 当用户登录到系统时,通常会启动一个登录 Shell。

  • 登录 Shell 会加载一系列的配置文件,用于设置用户的环境(具体文件在第三章说明)。

Non-Login Shell(非登录 Shell):

  • 当用户在已登录的会话中打开新的终端窗口或启动一个新的 Shell 时,会使用非登录 Shell。

    非登录 Shell 通常是为了执行用户的命令而启动的,不需要执行登录过程的设置。

    非登录 Shell 也会加载一系列的配置文件,用于设置用户的环境(具体文件在第三章说明)。

2 Interactive & Non-Interactive

交互模式就是在终端上执行,Shell 等待你的输入,并且立即解释执行你提交的命令。这种模式被称作交互式,是因为 Shell 与用户进行交互。也是大多数用户非常熟悉的:登录、执行一些命令、退出,当你退出后,Shell 也终止了。

注:通常来说,Login Shell 都是 Interactive Shell。

同理,Shell 也可以运行在另外一种模式:非交互式模式。非交互模式以 Shell Script(非交互)方式执行,在这种模式下,Shell 不与你进行交互,而是读取存放在文件中的命令,并且依此解释执行它们。当它读到文件的结尾 Shell 也就终止了。

2.1 Interactive Shell

关于 Interactive Shell 这部分定义,可以从 Bash 手册里看到:

An  interactive  Shell  is  one started without non‐option arguments (unless -s is specified) and without the -c option,  whose  standard input  and  error  are both connected to terminals (as determined by isatty(3)), or one started with the -i option.  PS1 is  set  and  $- includes  i  if  bash  is  interactive, allowing a Shell script or a startup file to test this state.## 一个交互式 Shell 是在没有非选项参数(除非指定了 -s 选项)和 -c 选项的情况下启动的 Shell,其标准输入和错误都连接到终端,或者使用 -i 选项启动的Shell。如果 bash 是交互式的,PS1 被设置并且 $- 包含 i,允许 Shell 脚本或启动文件测试此状态。

上面那句话出现了一个单词:non‐option arguments(非选项参数),这是什么?

2.1.1 option & argument

在 Linux 中,命令行使用空格分割为一个个的 argument,例如:

以上图为例,命令执行时,在 ls 脚本的内部,可以使用 $0 来获取到 ls 这个字符串。同理,$1 可以获取到 -l,使用 $2 来获取到 -a 选项等等。

arguments 就是 $0、$1、$2、…,以空格分割命令行后的每个部分。像 -l 和 -a 这种可以改变 ls 命令的行为的,叫做选项(即 option),它们一般会被写在命令使用文档中:

那非选项参数是哪个?上述命令中参数 /path/to/folder 既不是 -l 选项的值,也不是 -a 选项的值,它不属于任何一个 option,所以它是一个 non-option arguments。

2.1.2 Interactive Shell 条件一

看下手册里面的几个单词:PS1 is set,这个 PS1 是啥?$PS1 用于自定义命令提示符的外观和内容,以便增强 Shell 的可视化和交互性。

说明是个 Interactive Shell 的话,变量 $PS1 应该是有输出值的:

[root@localhost ~]# echo $PS1[\u@\h \W]\$

使用 bash 命令的 -c 选项来执行上述命令:

注:bash -c 是在当前 Shell 进程中启动一个新的 Bash 子进程,并在该子进程中执行指定的命令或脚本。

[root@localhost ~]# bash -c "echo \$PS1"

可以理解为,执行 bash -c "echo $PS1" 命令的时候,实际上由当前 Shell 启动了一个非交互式 Shell,然后让这个非交互式去执行 echo $PS1 命令。

2.1.3 Interactive Shell 条件二

再看下手册里面的几个单词:$- includes i,这个 $- 又是个啥?$- 是一个特殊变量,用于表示当前 Shell 的选项和状态。当 Bash Shell 是交互式的时候,$- 会包含字母 i,表示 Shell 是交互式的。

说明是个 Interactive Shell  的话,变量 $- 的输出值应该包含 i:

[root@localhost ~]# echo $-himBH

使用 bash 命令的 -c 选项来执行上述命令:

[root@localhost ~]# bash -c 'echo $-'hBc

2.1.4 Interactive Shell 条件三

前面已知了两个条件,还有一个容易被忽略的非选项参数。

既然已经知道了 non-option arguments 的含义,我们来简单验证一下:

[root@localhost ~]# cat demo#!/bin/bashecho $-[root@localhost ~]# bash demohB[root@localhost ~]# bash[root@localhost ~]# echo $-himBH

还可以使用 bash -i 进行交互式 Shell 创建:

[root@localhost ~]#  bash -i demohimB

注:bash -i 是在当前 Shell 进程中启动一个新的 Bash 子进程,并使该子进程成为一个交互式 Shell。

2.2 总结

\Interactive ShellNon-Interactive Shell
$PS1$PS1 值为空只表示没有设置命令提示符,但并不足以确定 Shell 的交互性。但 $PS1 存在一定可认为当前 Shell  是一个交互式 Shell。当前 Shell 是非交互式的,$PS1 的值一定为空。
$-如果 $- 的值包含字母 i,那么当前 Shell 是一个交互式 Shell。如果 $- 的值不包含字母 i,那么当前 Shell 是一个非交互式 Shell。
Non-argument(排除 -i 参数)没有非选项参数有非选项参数
-i、-c-i:开启一个交互式的子 Shell 去执行命令-c:开启一个非交互式的子 Shell 去执行命令

3 Linux Bash Env-Conf

这里我们可以想一个问题,以前我想的少,现在想得多了:

  • Linux 的境配置文件包括 /etc/profile、~/bash_profile、~/.bashrc 等,它们通常会在用户登录时被执行,这些配置文件是每次登录都会调用吗?

  • 为什么有时候 /etc/profile 没有生效?这些配置文件的执行顺序是怎么样的?

注:这里主要基于 Bash,其他 Shell 可能不适用。

3.1 Bash 配置文件调用逻辑

可以参考大佬的一张图:

总结一下就是:

  • 如果一个 Shell 是 Login Shell 时,/etc/profile 会被调用,随后按顺序查找 ~/.bash_profile、~/.bash_login、~/.profile,并执行最先找到的一个。

  • 如果是交互式的 Non-Login Shell,则会调用 ~/.bashrc。

  • 如果是非交互式的 Non-Login Shell,则会执行环境变量 $BASH_ENV 中的脚本(如果存在,我也没有实践过)。

3.2 特殊情况

当然,凡是无绝对,上面这些被调用的脚本可能去调用其它脚本。例如:/etc/profile 可能去调用 /etc/profile.d/ 目录中的脚本。

在 CentOS 中 ~/.bash_profile 会调用 ~/.bashrc,查看下代码:

[root@localhost ~]# head -n 6 ~/.bash_profile ## .bash_profile## Get the aliases and functionsif [ -f ~/.bashrc ]; then	. ~/.bashrcfi

所以在 CentOS 中,Login Shell 的配置文件加载是这样的:

  • /etc/profile

  • ~/.bash_profile

  • ~/.bashrc

启动 Shell 时可以使用 --noprofile、--norc 等选项使 Shell 不去调用对应的配置文件或者指定调用的配置文件,很少用到不展开讨论。

如果启动 Shell 时使用 sh 命令(sh 是 /bin/bash 的一个软链接)情况又不同,如下:

使用 . 或者 source 去执行一个脚本,是在当前 Shell 中执行脚本,不会启动新的 Shell,所以不会去加载任何配置文件,没有上面这些流程。

注:

  • . 和 source 命令都用于在当前 Shell 环境中执行脚本,使脚本中的变量、函数、别名等定义在当前 Shell 中生效。

  • source 命令是 . 命令的一个 Bash 内建命令别名。

    最新文章

    随机文章

    基本 文件 流程 错误 SQL 调试
    1. 请求信息 : 2026-07-03 08:28:46 HTTP/2.0 GET : https://f.mffb.com.cn/a/494605.html
    2. 运行时间 : 0.150806s [ 吞吐率:6.63req/s ] 内存消耗:4,780.09kb 文件加载:140
    3. 缓存信息 : 0 reads,0 writes
    4. 会话信息 : SESSION_ID=2913ee7d32a7d938b04deb40d3bc6a94
    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.000437s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
    2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000889s ]
    3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000932s ]
    4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000381s ]
    5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000520s ]
    6. SELECT * FROM `set` [ RunTime:0.000737s ]
    7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000651s ]
    8. SELECT * FROM `article` WHERE `id` = 494605 LIMIT 1 [ RunTime:0.005018s ]
    9. UPDATE `article` SET `lasttime` = 1783038526 WHERE `id` = 494605 [ RunTime:0.006428s ]
    10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.006600s ]
    11. SELECT * FROM `article` WHERE `id` < 494605 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.014141s ]
    12. SELECT * FROM `article` WHERE `id` > 494605 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.005270s ]
    13. SELECT * FROM `article` WHERE `id` < 494605 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.000963s ]
    14. SELECT * FROM `article` WHERE `id` < 494605 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.006851s ]
    15. SELECT * FROM `article` WHERE `id` < 494605 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.030713s ]
    0.152387s