[thelist] PHP force download of file?

Theodore Serbinski stanson at gmail.com
Wed Feb 16 11:16:56 CST 2005


Thanks man! 

So what's the largest files you have worked this and this works? Seems
like the chunkify code might only be applicable in cases where files
are VERY big. Since I'm looking at 50MB I think I should be good.

ted


On Tue, 15 Feb 2005 16:23:33 -0800, Ivo P <ipletikosic at gmail.com> wrote:
> I've handled it is this way & works like a charm so far:
> 
> Header( "Content-Type: application/octet-stream" );
> Header( "Content-Length:" . filesize( $filepath ) );
> Header( "Content-Disposition: attatchment; filename=$filename" );
> readfile( $filepath );


More information about the thelist mailing list