Однако я столкнулся со следующей ошибкой:
Код: Выделить всё
copy(http://127.0.0.1:8000/data/ergebnis_16.04.2024_08-41-38.docx): Failed to open stream: HTTP wrapper does not support writeable connectionsКод: Выделить всё
$timestamp = date('d.m.Y_H-i-s');
$templatePath = public_path('templates/su_temp_general.docx');
$outputPath = url('http://127.0.0.1:8000/data/ergebnis_' . $timestamp . '.docx');
$su = 1;
$mva_bam = 1000;
$description = "Testbeschreibung";
$date = date('d.m.Y');
$serialNo = '123456';
$material = 'Aluminium';
$workcenter = 'DR123';
$process = 'Testprozess';
$toolNo = '123456x';
$typeInvestigations = 'Testuntersuchung';
$template = new TemplateProcessor($templatePath);
$template->setValue('Su', $su);
$template->setValue('Mva_Bam', $mva_bam);
$template->setValue('Description', $description);
$template->setValue('Date', $date);
$template->setValue('PartNo', $partNo);
$template->setValue('SerialNo', $serialNo);
$template->setValue('Material', $material);
$template->setValue('Workcenter', $workcenter);
$template->setValue('Process', $process);
$template->setValue('ToolNo', $toolNo);
$template->setValue('TypeInvestigations', $typeInvestigations);
$template->setValue('Customer', $customer);
$template->saveAs($outputPath);
Подробнее здесь: https://stackoverflow.com/questions/783 ... -directory
Мобильная версия