I have a question about PHP Word and I can't find a way to save my file in the templateprocessor or anywhere else. The file is always automatically moved to the Temp folder.
Does anyone know in which file I have to change the location in the PHP Word library or how I have to declare the command exactly?
thanks for your help
<?php
require_once 'bootstrap.php';
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('C:/inetpub/wwwroot/ITP-Warehouse/Test/Documents/test.docx/');
$templateProcessor->setValue('title', 'name');
$pathToSave = 'C:\inetpub\wwwroot\ITP-Warehouse\Test\Documents';
$templateProcessor->saveAs($pathToSave);
$documentName = $templateProcessor->save();
$NewdocumentName = substr($documentName, 0, -3);
$NewdocumentName = $NewdocumentName . "docx";
rename($documentName,$NewdocumentName);
$datei_url = $NewdocumentName;
?>