Forum


Replies: 4   Views: 2734
Error while trying to open the (base) template as a zip file
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by nhupv  · 08-01-2019 - 04:05

hello, i am trying to open a docx template file but i get the error message: Error while trying to open the (base) template as a zip file

I am using  codeigniter framework.How to solve this problem?

here is my code in controller: 

public function createdocx()
    {
        $docx= new CreateDocxFromTemplate('../../upload_files/Template.docx');
        $docx->replaceVariableByText(array('nameReport' => 'John Smith'));
        $docx ->createDocx('helloword');
    }

 Template.docx is saved in the upload_files folder outside the controller directory .