Re: [請益] readfile 效率問題

看板PHP作者 (Southern Cross)時間19年前 (2006/07/17 21:55), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
小弟有遇到這種問題 一個 "新增文件.txt"的內容只有123 ob_end_clean(); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Disposition: attachment;filename=\"$filename\""); header("Content-Length: $file_size"); header("Content-Transfer-Encoding: binary"); ob_end_clean(); readfile($redir); ob_end_flush(); 如果不加這三行 我下載下來的內容會是 (換行) 123 (換行) 就是多了兩個換行符號 我至今仍然不知道為什麼會這樣orz 只知道try很久 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.140.49.113
文章代碼(AID): #14kvRhGa (PHP)
文章代碼(AID): #14kvRhGa (PHP)