[thelist] PHP force download of file?

Ivo P ipletikosic at gmail.com
Thu Feb 17 10:44:42 CST 2005


This code is part of an app that manages access to ~10,000 internal
documents for ~2,000 users. Largest file today is 63MB.

Ivo


On Wed, 16 Feb 2005 12:16:56 -0500, Theodore Serbinski
<stanson at gmail.com> wrote:
> 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