Aucune description

Sample_11_ReadWord2007.php 387B

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