2012年10月12日 星期五

CuteFlow-夾檔無法夾中文

路徑:pages\editcirculation_write.php

[PHP]move_uploaded_file UTF-8 的中文檔案名上傳問題

utf-8 編碼網頁無法在 big5 系統正確處理中文檔名,原因在於 move_uploaded_file() 不能處理 utf-8 中文編碼,需利用 iconv() 函數作轉碼,解決方法如下:

請將

move_uploaded_file($_FILES['myfile']['tmp_name'], $uploadfile)

改為

move_uploaded_file($_FILES['myfile']['tmp_name'], iconv("utf-8", "big5", $uploadfile))

-----

pages\editcirculation_write.php

(~535)
    
move_uploaded_file($_FILES[$key]['tmp_name'], iconv("utf-8", "big5", $uploadfile));

沒有留言: