PhpWord TemplateProcessor -Rückgabewert?Php

PHP-Programmierer chatten hier
Anonymous
 PhpWord TemplateProcessor -Rückgabewert?

Post by Anonymous »

Was ist der Rückgabewert von $ template_processor-> Saveas () ? Ich habe versucht, den Rückgabewert zu erfassen, um festzustellen, ob der Prozess erfolgreich ausgeführt wird oder nicht < /p>

Code: Select all

public function create_spm($data_spm){
$templateFile = FCPATH.'upload_file/template_spm/template_spm.docx';
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$template_file = $templateFile;
$template_processor = new \PhpOffice\PhpWord\TemplateProcessor($template_file);
$template_processor->setValues($data_spm);
$output_file = FCPATH.'upload_file/spm/spm.docx';
$hasil=$template_processor->saveAs($output_file);
var_dump($hasil);
exit();
}
Es wird immer zurückgegeben.>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post