<?php
require_once 'vendor/autoload.php';
use PhpOffice\PhpWord\IOFactory;
$filePath = 's.docx'; // 替换为实际的 Word 文件路径
$phpWord = IOFactory::load($filePath);
$htmlWriter = new \PhpOffice\PhpWord\Writer\HTML($phpWord);
$html = $htmlWriter->getContent();
// 将 HTML 内容保存到文件
file_put_contents('output.html', $html);
?>