[PHP]CSV出力@メモリ節約
$csvfile = date('YmdHis') . ".csv"; header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . $csvfile); $fp = fopen('php://output','w'); stream_filter_append($fp, 'convert.iconv.UTF-8/CP932', STREAM_FILTER_WRITE); fputcsv($fp, array('A','B','C')); fclose($fp);