[請益] PHP 產生 RTF
header('Content-type: application/msword;charset=utf-8');
header('Content-Disposition: inline, filename=app_form.rtf');
$filename='app.rtf';
$fp=fopen($filename,'r');
$output=fread($fp, filesize($filename));
fclose($fp);
$output=str_replace('<<last_name>>',' '.$row->last_name,$output);
$output=str_replace('<<first_name>>',' '.$row->first_name,$output);
echo $output;
目前大概是以這種方式產生RTF檔案
不過發現如果變數內容是中文的話會變成亂碼
請問該怎麼處理呢?? 頁面編碼已經設定成utf8了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.0.34.18
→
05/09 01:14, , 1F
05/09 01:14, 1F
→
05/09 03:47, , 2F
05/09 03:47, 2F
→
05/09 10:19, , 3F
05/09 10:19, 3F
→
05/10 00:44, , 4F
05/10 00:44, 4F
→
05/10 00:44, , 5F
05/10 00:44, 5F
討論串 (同標題文章)