:::

2-4 phpWord基本用法

  1. 底下是基本頁面,其餘用請參考講義:https://www.tad0616.net/modules/tad_book3/page.php?tbdsn=1498
  2. 基本Word頁面:
    <?php
    require 'vendor/autoload.php';
    $phpWord = new \PhpOffice\PhpWord\PhpWord();
    $filename = "檔名";
    $filename = iconv("UTF-8", "Big5", $filename);
    $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
    header('Content-Type: application/vnd.ms-word');
    header("Content-Disposition: attachment;filename={$filename}.docx");
    header('Cache-Control: max-age=0');
    $objWriter->save('php://output');
    

     


:::

書籍目錄

展開 | 闔起

https%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1339%26tbsn%3D36

計數器

今天: 617617617
昨天: 2027202720272027
總計: 7971658797165879716587971658797165879716587971658