ठीक है तो मैं इस कोड है कि एक उपयोगकर्ता एक गीतनाम में रिक्त स्थान डाउनलोड तोड़ रहा है?
$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');
समस्या यह है कि उपयोगकर्ता केवल sinsita
नामक एक पाठ फ़ाइल डाउनलोड करेगा गीत sinsita happy 1 SONIFI.mp3
की तरह उस में एक जगह है, तो है डाउनलोड करने के लिए अनुमति देगा है .. कैसे इस व्यवहार ठीक करने के लिए .Any विचारों
http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in- देखें http –