Ah - that I did not know... however, i'm not convinced that this was the problem... I just thought it was :)


What it seems to be doing is failing to stream big files (50mb) (I thought is was a path issue - it ain't) ... but when I take a bit of the big file, chop it down to 500k... upload that... it works. Dunno.

It's on dreamhosts... and... apparently they changed PHP version or Apache version or something recently - so what was working before, no longer does.

Tis a puzzle.




Nick








When I run this
<?php

$file='directory/test.mp3';

header("Content-Type: mp3");
header('Content-disposition: attachment; filename="'.$file.'"');

?>
it tries to access

directory_test.mp3

The filename in the content-disposition header isn't the name of a file
on your server - it's informing the user's browser what name to give the
file you're downloading to them. This gets used in the saved ialog.
It's up to you to actually send some file content after these headers,
as just setting a filename in the content-disposition won't actually
send any content.

Try something like

 $file = 'test.mp3';
 header("Content-Type: audio/mp3");
 header('Content-disposition: attachment; filename="'.$file.'"');
 readfile('directory/test.mp3');


--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to