|
|
PHP Quellcode |
1 2 3 4 5 6 7 8 |
include '../functions/connection.php'; include '../functions/php/doc1.php'; if($_GET['mp3id']){ $downloadfile=sendquery("SELECT Downloadlink FROM mp3 WHERE ID=".$_GET['mp3id'], 3, 0); header("Content-Disposition: attachment; filename=".str_replace(" ", "%20", basename($downloadfile))); header("Content-Type: application/octet-stream"); readfile(str_replace(" ", "%20", $downloadfile)); } |
|
|
PHP Quellcode |
1 |
header("Content-Disposition: attachment; filename=\"$downloadfile\""); |

|
|
HTML Code |
1 2 3 4 |
<br /> <b>Warning</b>: readfile() [<a href='function.readfile'>function.readfile</a>]: Unable to access data/mp3/2009_02/sds - sds.mp3 in <b>/var/www/web1/html/Rusicc/content/download.php</b> on line <b>8</b><br /> <br /> <b>Warning</b>: readfile(data/mp3/2009_02/sds - sds.mp3) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>/var/www/web1/html/Rusicc/content/download.php</b> on line <b>8</b><br /> |
|
|
PHP Quellcode |
1 |
Unable to access data%2Fmp3%2F2009_02%2Fsds+-+sds.mp3 |
|
|
PHP Quellcode |
1 2 3 |
header("Content-Disposition: attachment; filename=\"$downloadfile\""); header("Content-Type: application/octet-stream"); readfile(base64_encode($downloadfile)); |
|
|
PHP Quellcode |
1 |
Unable to access ZGF0YS9tcDMvMjAwOV8wMi9hIC0gYS5tcDM= |
wenn ich es so mache:
![]()
PHP Quellcode
1 2 3 header("Content-Disposition: attachment; filename=\"$downloadfile\""); header("Content-Type: application/octet-stream"); readfile(base64_encode($downloadfile));
bekomme ich:
![]()
PHP Quellcode
1 Unable to access ZGF0YS9tcDMvMjAwOV8wMi9hIC0gYS5tcDM=
irgendwas mache ich grundlegend falsch habe ich so das Gefühl![]()
|
|
PHP Quellcode |
1 |
readfile($downloadfile); |
This post has been edited 2 times, last edit by "Koljan777" (Feb 24th 2009, 1:13pm)
Quoted
"../data/mp3/####_##/*.mp3"
|
|
PHP Quellcode |
1 2 3 4 5 6 7 |
if($_GET['mp3id']){ $downloadfile=sendquery("SELECT Downloadlink FROM mp3 WHERE ID=".$_GET['mp3id'], 3, 0); $filename=substr($downloadfile,strrpos($downloadfile, "/")+1); header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Type: application/octet-stream"); readfile("../".$downloadfile); } |