跳至主內容區

XOOPS輕鬆架

:::

主內容區域

選擇後會自動跳轉頁面

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

     

選擇後會自動跳轉頁面

:::

左邊區域內容

書籍目錄

展開 | 闔起

快速登入


右邊區域內容

請掃此 QR Code 可連至此頁面

計數器

今天: 1085108510851085
昨天: 2059205920592059
總計: 9353769935376993537699353769935376993537699353769

頁尾區域