How to fix this error PhpOffice/PhpWord?
**A PHP Error was encountered**
Severity: Warning
Message: ZipArchive::close(): Invalid or uninitialized Zip object
Filename: Shared/ZipArchive.php
Line Number: 163
Backtrace:
File: C:xampphtdocsword_civendorphpofficephpwordsrcPhpWordSharedZipArchive.php
Line: 163
Function: close
This is the syntax :
public function test5() {
$templateProcessor = new PhpOfficePhpWordTemplateProcessor('template/Template.docx');
// Table with a spanned cell
$templateProcessor->setValue('Value1', 'the test is perfect');
$templateProcessor->saveAs('template/S07d.doc');
}
This is a screenshot of the error:
New contributor
kriss_xxx is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.