[請益] 關於PHP輸出Word的中文問題

看板PHP作者 (鳥鵬)時間19年前 (2006/11/21 16:20), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
最近在利用PHP輸出word時,出現一些問題… 當輸入的內容為中文字時,輸出的word裡會多出現一些原本沒有輸入的亂碼… ps.原本輸入的中文字都有出現 請問有人有遇到這樣的問題嗎? 以下是我的程式碼: $wordTable->ActiveDocument->Tables->Add($wordTable->Selection->Range,2,2); $wordTable->Selection->TypeText("中文字串\n"); //Write to the current cell $wordTable->Selection->MoveRight(); $wordTable->Selection->TypeText("中文字串\n"); $wordTable->Selection->InlineShapes->AddPicture("C:\\Program Files\\xampp\\htdocs\\examweb\\pic\\".$record[0].".jpg"); $wordTable->Selection->MoveRight(); //Tab to the next cell $wordTable->Selection->TypeText("中文字串\n"); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.116.245.241

11/21 17:57, , 1F
是UTF8嗎
11/21 17:57, 1F

11/22 09:34, , 2F
中文字串都是big5耶…
11/22 09:34, 2F
文章代碼(AID): #15OhRSDN (PHP)
文章代碼(AID): #15OhRSDN (PHP)