Ok, więc mam ten kod, który pozwoli użytkownikowi na pobranie utworuSpaces w nazwie przerywa pobieranie?
$file = DIR_DOWNLOAD . $download_info->row['filename'];
$mask = basename($download_info->row['mask']);
$mime = 'application/octet-stream';
$encoding = 'binary';
if (!headers_sent()) {
if (file_exists($file)) {
header('Pragma: public');
header('Expires: 0');
header('Content-Description: File Transfer');
header('Content-Type: ' . $mime);
header('Content-Transfer-Encoding: ' . $encoding);
header('Content-Disposition: attachment; filename=' . ($mask ? $mask : basename($file)));
header('Content-Length: ' . filesize($file));
$file = readfile($file, 'rb');
Problem polega na tym, że jeśli utwór ma miejsca w nim jak sinsita happy 1 SONIFI.mp3
użytkownik pobierze tylko plik tekstowy o nazwie sinsita
.. .any pomysły, jak rozwiązać ten problem
Zobacz http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in- http –