You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
「blog.plastik.jp » PHP5 の fgetcsv() で読み込み内容が腐る現象」という記事を読みました。fgetcsv()だとSJISのCSVファイルがうまく読めないので、UTF-8に直してテンポラリファイルに保存してfgetcsvで読み込む、という筋書きのようです。 ちゃんとtmpfile()を使っていたりしてナイスなコードだと思います。でも、すぐ不要になるデータをディスクに書き込むのはイマイチじゃないでしょうか。ここはメモリに書いた方がカッコいいと思うんです。僕なら下記のようにします。 <?php $data = file_get_contents("example.csv"); $data = mb_convert_encoding($data, "UTF-8", "Shift_JIS"); $fp = fopen('php://memory', 'r+'); fw
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く