有幾位大學老師真的讓我非常敬佩又尊重。
(當然我相信一定有更多的老師讓人佩服,只是沒有機會可以在網路世界接觸到)
以下列表僅單純代表個人的喜好:
1.洪朝貴老師 - 資訊人權貴ㄓ疑
2.葉丙成老師 - 丙紳隨筆
3.洪士灝老師 - 只是想寫Just feel like writing
4.陳鐘誠 老師 - 陳鍾誠的網站首頁- 陳鍾誠的網站
Thursday, March 17, 2016
Thursday, January 28, 2016
PHP 解決 IE 下載中文檔名亂碼
最近在測試檔案下載,輸出中文檔名的時候。
發現IE 會變成亂碼,後來從保哥的文章找到了解決方法。
URL_ENCODE() 來解決中文亂碼問題。
For Example
發現IE 會變成亂碼,後來從保哥的文章找到了解決方法。
URL_ENCODE() 來解決中文亂碼問題。
For Example
$file_name=urlencode($file_name);header("Content-Type:text/html; charset=utf-8");header('Last-Modified: '.gmdate('D, d M Y H:i:s',time()).' GMT');header('Pragma: no-cache');header('Content-Encoding: none');header('Content-Disposition: '.'attachment'.'; filename='.$file_name);header('Content-type: '.$file_type);header('Content-Length: '.filesize( $file_path_on_server ));?>
Reference
ASP.NET 如何設定強制下載檔案並正確處理中文檔名的問題
Subscribe to:
Posts (Atom)