Re: Problem with HTTP_Download

From: Date: Thu, 03 Mar 2005 13:39:14 +0000
Subject: Re: Problem with HTTP_Download
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17810@lists.php.net to get a copy of this message
Hi Pt2002, you wrote: > <?php > require_once 'HTTP/HTTP_Download.php'; > $dl = &new HTTP_Download(); > $dl->setFile('/home/user1/file.pdf'); > $dl->setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, 'test.zip'); > > // with ext/magic.mime > // $dl->guessContentType(); > // else: > > $dl->setContentType('application/zip'); > $dl->send(); > ?> > > It starts the download but I get a 0 bytes test.zip HTTP_Download cannot magically ZIP your PDF file. If the file really exists, it should work if you replace "test.zip" with "test.pdf" and "application/zip" with "application/pdf". Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.pear.general (#17810) next »