#将本地临时文件渲染数据 $file = $protocol_info[‘src‘] . ‘/‘ . ‘baiqishi‘; $content = $this->fetch($file . ‘.html‘);//替换成模板渲染 $wordFile = $protocol_info[‘src‘] . ‘/files/‘ . $run_id . ‘.html‘; $fh = fopen($wordFile, "w+"); fwrite($fh, $content); ob_clean(); fclose($fh);//关闭句柄很重要