Mam kod pobierania:
//First, see if the file exists //Gather relevent info about file //This will set the Content-Type to the appropriate setting for the file switch( $file_extension ) { case "txt": $ctype="text/plain"; case "csv": $ctype="text/plain"; break; default: $ctype="application/force-download"; } //Begin writing headers //Use the switch-generated Content-Type //Force the download @$header="Content-Disposition: attachment; filename=".$filename.";"; exit;
No i oczywiście ob_start i ob_end_flush() nie braknie... ;]
Ale cały czas pobiera w txt... jak zmienić na sta ?