PHP使用phpword替换模板内容,不多说,直接上代码 /** * @param $param * @throws \PhpOffice\PhpWord\Exception\CopyFileException * @throws \PhpOffice\PhpWord\Exception\CreateTemporaryFileException * 生成教学word */ public function testDataToWord($param){ $data = json_decode(ExcelTo