Keine Beschreibung

Sample_30_ReadHTML.php 405B

123456789101112131415
  1. <?php
  2. include_once 'Sample_Header.php';
  3. // Read contents
  4. $name = basename(__FILE__, '.php');
  5. $source = realpath(__DIR__ . "/resources/{$name}.html");
  6. echo date('H:i:s'), " Reading contents from `{$source}`", EOL;
  7. $phpWord = \PhpOffice\PhpWord\IOFactory::load($source, 'HTML');
  8. // Save file
  9. echo write($phpWord, basename(__FILE__, '.php'), $writers);
  10. if (!CLI) {
  11. include_once 'Sample_Footer.php';
  12. }