還沒想到
2012年7月30日 星期一
PHP匯出Excel可讀的UTF-8編碼CSV檔案
$fp = fopen($file_name);
用fputcsv製作出來的檔案,
編碼為utf-8無BOM,導致用Excel打開會是亂碼,
因此在寫入資料前先
寫入utf8的BOM
就可以解決!
fwrite($fp, "\xEF\xBB\xBF");
//解決utf8檔頭無BOM之問題
2012年7月5日 星期四
curl - Protocol http not supported or disabled in libcurl
錯誤訊息:
Protocol http not supported or disabled in libcurl
原因:
url字串裡,目幹多放了空格啊= =+
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)