謝謝各位
後來我想說把她轉成RTF檔
我的程式碼如下,不過中文字卻會變亂碼,我有試過將$a的內容利用mb_convert_encoding()轉碼,不過無效
這部份需要再請教各位了,謝謝
header("Content-Disposition: attachment; filename=a.rtf");
header('Content-type: application/msword;);
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");
$head = file_get_contents("template/test2.rtf");
$a = str_replace("CLASS","哈哈",$head);
echo $a;
是 utf-8 嗎!?