:::

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');
    

     


:::

書籍目錄

展開 | 闔起

快速登入


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

計數器

今天: 960960960
昨天: 3068306830683068
總計: 8077465807746580774658077465807746580774658077465