当前位置:首页>php>spring boot 和php 调用 LibreOffice 转换 Excel 到 PDF 完整指南

spring boot 和php 调用 LibreOffice 转换 Excel 到 PDF 完整指南

  • 2026-06-22 17:00:38
spring boot 和php 调用 LibreOffice 转换 Excel 到 PDF 完整指南
在实际企业应用开发中,经常需要将 Excel 报表、采购订单、入库单等文档转换为 PDF 格式,以便于存档、打印或分发。相比直接操作 Excel 文件,PDF 具有跨平台、防篡改、版面固定等优点。而 LibreOffice 作为一款开源的办公套件,提供了强大的命令行转换能力,能够高质量地保留 Excel 的复杂样式、图表、公式和排版,是 Java 后端实现文档转换的理想选择。
本文将详细介绍如何使用 Java 调用 LibreOffice 将 Excel 文件转换为 PDF,并提供完整的代码示例、参数说明及常见问题解决方案。比如下面这种复杂excel表格,转换pdf就恒麻烦,尤其是样式回错乱。下面介绍一种方式,来实现windows环境下的无损转换pdf,linux只需要安装luinx下的包即可,这里不做演示。

一、为什么选择 LibreOffice?

目前主流的 Excel 转 PDF 方案有以下几种:
方案
优点
缺点
Apache POI + iText
纯 Java,无需安装额外软件
样式还原度差,对复杂表格、图表支持弱
JodConverter
封装了 LibreOffice 的调用,API 友好
同样需要安装 LibreOffice,但依赖较重
直接调用 LibreOffice 命令行
样式保真度最高,免费开源,跨平台
需要安装 LibreOffice,依赖外部进程
在企业级应用中,样式保真度往往是最重要的指标。LibreOffice 能够完美呈现 Excel 中的字体、颜色、边框、合并单元格、公式计算结果、甚至嵌入式图表,这是其他纯 Java 方案难以比拟的。因此,推荐使用 Java 调用 LibreOffice 命令行的方式。

二、环境准备

2.1 安装 LibreOffice

Windows:从 LibreOffice 官网
下载 LibreOffice | LibreOffice 简体中文官方网站 - 自由免费的办公套件下载安装包,默认安装路径为 C:\Program Files\LibreOffice\program\soffice.exe
Linux (Ubuntu/Debian):sudo apt install libreoffice -y
Linux (CentOS/RHEL):sudo yum install libreoffice -y
macOS:通过 Homebrew 安装:brew install --cask libreoffice
安装后,在终端执行 soffice --version 验证是否成功。

2.2 Java 环境

JDK 17及以上版本
任何 Java 框架均可(Spring Boot、普通 Maven 项目等)

三、核心原理

LibreOffice 提供无界面(headless)模式,可以通过命令行参数完成文档格式转换,而不启动图形界面。Java 通过 ProcessBuilder 或 Runtime.exec() 调用系统命令,执行 LibreOffice 的转换指令,然后读取生成的 PDF 文件即可。
基本命令格式如下:
bash
soffice --headless --convert-to pdf --outdir /output/dir /path/to/input.xlsx
--headless:无界面模式(必需)
--convert-to pdf:转换为 PDF
--outdir:输出目录
最后为输入文件路径

四、Java 实现步骤

4.1 创建转换器类

java
public class LibreOfficeConverter {
private static final Logger log = LoggerFactory.getLogger(LibreOfficeConverter.class);
private String sofficePath;
private int timeoutSeconds;
public LibreOfficeConverter(String sofficePath, int timeoutSeconds) {
this.sofficePath = sofficePath;
this.timeoutSeconds = timeoutSeconds;
}
public String excelToPdf(String excelPath, String outputDir) throws Exception {
// ... 方法实现(见之前的代码)
File excelFile = new File(excelPath);
if (!excelFile.exists()) {
throw new Exception("Excel文件不存在:" + excelPath);
}
File outputDirFile = new File(outputDir);
if (!outputDirFile.exists()) {
outputDirFile.mkdirs();
}
String absoluteExcelPath = excelFile.getAbsolutePath();
String absoluteOutputDir = outputDirFile.getAbsolutePath();
String command = String.format(
"%s --headless --convert-to pdf:writer_pdf_Export --outdir %s %s",
sofficePath,
absoluteOutputDir,
absoluteExcelPath
);
log.info("LibreOffice转换命令:{}", command);
ProcessBuilder processBuilder = new ProcessBuilder();
if (System.getProperty("os.name").toLowerCase().contains("windows")) {
processBuilder.command("cmd.exe", "/c", command);
} else {
processBuilder.command("bash", "-c", command);
}
processBuilder.environment().put("LANG", "zh_CN.UTF-8");
processBuilder.environment().put("LANGUAGE", "zh_CN.UTF-8");
processBuilder.redirectErrorStream(true);
Process process = null;
try {
process = processBuilder.start();
StringBuilder output = new StringBuilder();
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream(), "UTF-8"))) {
String line;
while ((line = reader.readLine()) != null) {
output.append(line).append("\n");
}
}
boolean finished = process.waitFor(timeoutSeconds, TimeUnit.SECONDS);
if (!finished) {
process.destroyForcibly();
throw new Exception("LibreOffice转换超时(" + timeoutSeconds + "秒)");
}
int exitCode = process.exitValue();
if (exitCode != 0) {
throw new Exception("PDF转换失败,退出码:" + exitCode);
}
String excelBaseName = excelFile.getName();
int dotIndex = excelBaseName.lastIndexOf(".");
String pdfName = (dotIndex > 0 ? excelBaseName.substring(0, dotIndex) : excelBaseName) + ".pdf";
String pdfPath = absoluteOutputDir + File.separator + pdfName;
return pdfPath;
} finally {
if (process != null && process.isAlive()) {
process.destroyForcibly();
}
}
}
public boolean isAvailable() {
try {
// 方法1:直接检查文件是否存在
File sofficeFile = new File(sofficePath);
System.out.println("检查路径: " + sofficeFile.getAbsolutePath());
System.out.println("文件是否存在: " + sofficeFile.exists());
System.out.println("是否可读: " + sofficeFile.canRead());
System.out.println("是否可执行: " + sofficeFile.canExecute());
if (!sofficeFile.exists()) {
// 尝试常见路径
String[] commonPaths = {
"D:/installsoftware/program/soffice.exe",
"D:\\installsoftware\\program\\soffice.exe",
};
for (String path : commonPaths) {
File testFile = new File(path);
if (testFile.exists()) {
sofficePath = path;
sofficeFile = testFile;
System.out.println("找到LibreOffice: " + path);
break;
}
}
if (!sofficeFile.exists()) {
System.err.println("未找到LibreOffice可执行文件");
return false;
}
}
// 方法2:直接执行命令(使用 ProcessBuilder)
ProcessBuilder pb = new ProcessBuilder(
sofficeFile.getAbsolutePath(), "--version"
);
pb.redirectErrorStream(true);
Process process = pb.start();
// 读取输出
StringBuilder output = new StringBuilder();
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(process.getInputStream(), "UTF-8"))) {
String line;
while ((line = reader.readLine()) != null) {
output.append(line);
}
}
boolean finished = process.waitFor(5, TimeUnit.SECONDS);
if (finished && process.exitValue() == 0) {
System.out.println("LibreOffice版本: " + output.toString());
return true;
} else {
System.err.println("退出码: " + process.exitValue());
return false;
}
} catch (Exception e) {
System.err.println("检查失败: " + e.getMessage());
e.printStackTrace();
return false;
}
}
}
java
@RestController
@RequestMapping("/api/convert")
public class ExcelToPdfController {
@Value("${libreoffice.path}")
private String sofficePath;
@Value("${libreoffice.timeout:300}")
private int timeout;
@Value("${file.upload-dir:./uploads}")
private String uploadDir;
@Value("${file.pdf-dir:./pdfs}")
private String pdfDir;
/**
* 上传Excel并转换为PDF
*/
@PostMapping("/excel-to-pdf")
public ResponseEntity convertExcelToPdf(@RequestParam("file") MultipartFile file) {
Path excelFilePath = null;
try {
// 修正:使用绝对路径,并规范化路径
Path uploadPath = Paths.get(uploadDir).toAbsolutePath().normalize();
Path pdfPath = Paths.get(pdfDir).toAbsolutePath().normalize();
// 打印调试信息
System.out.println("上传目录绝对路径: " + uploadPath);
System.out.println("PDF目录绝对路径: " + pdfPath);
// 创建目录
if (!Files.exists(uploadPath)) {
Files.createDirectories(uploadPath);
System.out.println("创建上传目录: " + uploadPath);
}
if (!Files.exists(pdfPath)) {
Files.createDirectories(pdfPath);
System.out.println("创建PDF目录: " + pdfPath);
}
// 保存上传的Excel文件
String originalFilename = file.getOriginalFilename();
System.out.println("原始文件名: " + originalFilename);
// 处理文件扩展名
String ext = "";
if (originalFilename != null && originalFilename.contains(".")) {
ext = originalFilename.substring(originalFilename.lastIndexOf("."));
} else {
ext = ".xlsx";
}
String fileName = UUID.randomUUID().toString() + ext;
excelFilePath = uploadPath.resolve(fileName);
// 确保父目录存在
Files.createDirectories(excelFilePath.getParent());
// 保存文件
file.transferTo(excelFilePath.toFile());
System.out.println("保存Excel到: " + excelFilePath);
// 检查文件是否保存成功
if (!Files.exists(excelFilePath)) {
throw new Exception("Excel文件保存失败");
}
// 检查LibreOffice
LibreOfficeConverter converter = new LibreOfficeConverter(sofficePath, timeout);
boolean available = converter.isAvailable();
System.out.println("LibreOffice可用性: " + available);
if (!available) {
throw new Exception("LibreOffice不可用,请检查路径: " + sofficePath);
}
// 转换
String pdfFilePath = converter.excelToPdf(excelFilePath.toString(), pdfPath.toString());
System.out.println("生成PDF: " + pdfFilePath);
// 获取PDF文件名
Path pdfPathObj = Paths.get(pdfFilePath);
String pdfFileName = pdfPathObj.getFileName().toString();
Map result = new HashMap<>();
result.put("success", true);
result.put("pdfPath", pdfFilePath);
result.put("pdfName", pdfFileName);
result.put("downloadUrl", "/api/convert/download/" + pdfFileName);
return ResponseEntity.ok(result);
} catch (Exception e) {
e.printStackTrace();
Map error = new HashMap<>();
error.put("success", false);
error.put("message", e.getMessage());
error.put("type", e.getClass().getName());
return ResponseEntity.internalServerError().body(error);
} finally {
// 删除临时Excel文件
if (excelFilePath != null && Files.exists(excelFilePath)) {
try {
Files.deleteIfExists(excelFilePath);
System.out.println("删除临时文件: " + excelFilePath);
} catch (IOException e) {
System.err.println("删除临时文件失败: " + e.getMessage());
}
}
}
}
}

4.3 配置文件 (application.yml)

yaml
libreoffice:
path: D:\\installsoft\\program\\soffice.exe
timeout: 300
upload-dir: D:\\javaproject\\code\\regionprogect\\search\\uploads

使用绝对路径

pdf-dir: D:\\javaproject\\code\\regionprogect\\search\\pdfs

使用绝对路径

五、关键参数详解

参数
作用
--headless
无图形界面模式,不启动 UI
--nofirststartwizard
禁止首次运行向导弹窗
--norestore
不恢复上次崩溃未保存的文档
--nologo
不显示启动 Logo
--invisible
完全不可见模式(配合 headless)
--convert-to pdf[:writer_pdf_Export]
转换为 PDF,可指定导出过滤器
--outdir
指定输出目录
-env:UserInstallation=file:///path
指定用户配置目录(避免弹窗)

5.1 避免弹窗的额外技巧

如果依然弹出“Press Enter to continue...”或配置向导,可以添加 -env:UserInstallation 参数指定一个临时目录:
java
String tempUserDir = System.getProperty("java.io.tmpdir") + "libreoffice_user_" + System.currentTimeMillis(); String[] command = {     sofficePath,     "--headless",     "--nofirststartwizard",     "-env:UserInstallation=file:///" + tempUserDir.replace("\\", "/"),     "--convert-to", "pdf",     "--outdir", outputDir,     excelPath }; // 转换完成后删除临时目录
测试一下:
转换出来的pdf样式和之前的excel一样的:
如果是使用php的话,也是支持的,php实现的代码如下:
try {
$sofficePath = 'D:\installsoft\program\soffice.exe';
// 构建命令
// 使用 :writer_pdf_Export 导出器确保 Excel 转 PDF 最佳效果
$command = sprintf(
'%s --headless --convert-to pdf:writer_pdf_Export --outdir %s %s 2>&1',
escapeshellcmd($sofficePath),
escapeshellarg($saveDir),
escapeshellarg($filePath)
);
$pdfName = pathinfo($filePath, PATHINFO_FILENAME);
Log::info('LibreOffice转换命令:' . $command);
// 设置环境变量(解决中文乱码问题)
putenv('LANG=zh_CN.UTF-8');
putenv('LANGUAGE=zh_CN.UTF-8');
// 执行转换
$output = [];
$returnCode = 0;
exec($command, $output, $returnCode);
if ($returnCode !== 0) {
$errorMsg = implode("\n", $output);
Log::error('LibreOffice转换失败:' . $errorMsg);
throw new \Exception('PDF转换失败:' . $errorMsg);
}
if (!file_exists(app()->getRootPath() . 'public/storage/' .$savePath.'/'.$filename.'.pdf')) {
throw new \Exception('服务器繁忙,请稍后再试!');
}
// 返回成功结果
return [
'code' => 200,
'msg' => '导出成功',
'data' => [
'fileName' => $filename.'.pdf',
'fileUrl' =>  $savePath ,
]
];
} catch (\Exception $e) {
return ['code' => 500, 'msg' => $e->getMessage()];
}

六、异常处理与优化建议

6.1 常见异常及解决方法

异常现象
可能原因
解决方案
进程超时
文件过大或 LibreOffice 卡死
增大 timeout 值,或使用异步任务
退出码非 0
文件损坏、密码保护、路径含空格
检查文件,路径用双引号包裹
弹出“User Installation”对话框
首次运行缺少配置
使用 -env:UserInstallation 参数
中文文件名乱码
系统编码问题
设置 LANG=zh_CN.UTF-8 环境变量

6.2 性能优化

复用用户配置目录:指定固定的 UserInstallation 目录,避免每次创建临时目录,减少初始化开销。
控制并发:LibreOffice 进程启动较慢(约 2-3 秒),高并发时建议使用队列 + 单进程连接池(如 JodConverter 内置的进程池)。
异步处理:对于大文件,可改为异步转换 + 轮询结果,避免 HTTP 请求阻塞。

6.3 设置环境变量(解决中文乱码)

java
pb.environment().put("LANG", "zh_CN.UTF-8"); pb.environment().put("LANGUAGE", "zh_CN.UTF-8");

七、完整项目示例(Maven 依赖)

不需要额外依赖,仅使用 JDK 标准库。 Spring Boot 项目,只需添加 Spring Web 起步依赖:
xml
org.springframework.boot     spring-boot-starter-web

八、总结

通过 Java 调用 LibreOffice 命令行,我们可以低成本地获得企业级 Excel 转 PDF 功能,样式保留度接近 100%。该方法不依赖昂贵的商业组件,部署简单,只需在服务器上安装 LibreOffice 即可。
关键步骤回顾:
安装 LibreOffice,记录可执行文件路径。
使用 ProcessBuilder 执行带 --headless 等参数的转换命令。
正确处理进程超时、输出目录、临时文件清理。
利用 -env:UserInstallation 避免弹窗,设置环境变量解决中文乱码。
该方案已在多个生产环境中稳定运行,支持 Excel、Word、PPT 转 PDF,是开源技术栈中非常实用的文档转换方案。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-03 06:41:02 HTTP/2.0 GET : https://f.mffb.com.cn/a/497983.html
  2. 运行时间 : 0.131273s [ 吞吐率:7.62req/s ] 内存消耗:4,770.02kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=67611ff9c43fcc1c2b69485ecfcf559c
  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.000733s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000994s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000386s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000270s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000632s ]
  6. SELECT * FROM `set` [ RunTime:0.000248s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000692s ]
  8. SELECT * FROM `article` WHERE `id` = 497983 LIMIT 1 [ RunTime:0.009140s ]
  9. UPDATE `article` SET `lasttime` = 1783032062 WHERE `id` = 497983 [ RunTime:0.008435s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 64 LIMIT 1 [ RunTime:0.000375s ]
  11. SELECT * FROM `article` WHERE `id` < 497983 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000656s ]
  12. SELECT * FROM `article` WHERE `id` > 497983 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000497s ]
  13. SELECT * FROM `article` WHERE `id` < 497983 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002560s ]
  14. SELECT * FROM `article` WHERE `id` < 497983 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.003110s ]
  15. SELECT * FROM `article` WHERE `id` < 497983 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.030399s ]
0.133018s