Nenhuma descrição

Sample_24_ReadODText.php 396B

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