-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
I am using PHPword to generate the word documents. I want to generate multiple documents so that I want to use the template. I tried this code in the controller
$templateProcessor = new TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx');
$templateProcessor->setValue('Name', 'John Doe');
$templateProcessor->setValue(array('City', 'Street'), array('Detroit', '12th Street'));
and following error is displayed:
copy(resources/Sample_07_TemplateCloneRow.docx): failed to open stream: No such file or directory
at :
// Template file cloning
if (false === copy($documentTemplate, $this->tempDocumentFilename)) {
throw new CopyFileException($documentTemplate, $this->tempDocumentFilename);
}
What is the default directory of Template Processor? or we have to give location manually. Please help!
- PHP version:7.0 laravel 5.5
- PHPWord version: 0.14