PEAR HTTP_DOWLOAD problem
| From: | Emmanuel | Date: | Thu, 01 Apr 2004 07:32:40 +0000 |
| Subject: | PEAR HTTP_DOWLOAD problem | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-26918@lists.php.net to get a copy of this message | ||
Hello every body!
I'm a new user of PEAR.
I want to permit some users to dowload hidden files (in directories
protected by .htaccess.
Here the code I use:
$dl = &new HTTP_Download();
$dl->setFile('./AG001/'.$_GET['fichier']);
$dl->setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, $_GET['fichier']);
$dl->guessContentType();
$dl->send();
The dowload is successfull, but the file I get is modified and not readable
(the dowload create 2 octets in the start off the file)
Can you help me please?
Thank's