how to use a pear package!?
Posted
by Naughty.Coder
on Stack Overflow
See other posts from Stack Overflow
or by Naughty.Coder
Published on 2010-03-14T23:17:31Z
Indexed on
2010/03/14
23:25 UTC
Read the original article
Hit count: 307
I want to use HTTP_DOWNLOAD to manage my downloads ,, I have never used PEAR before !!
HTTP_DOWNLOAD depends on many other packages , I downloaded them and the ones they , in turn , depend on and this is the structure I made :
Download.PHP <---HTTP_DOWNLOAD MAIN FILE
Header.php <--- HTTP_HEADER MAIN FILE
PEAR.php
PEAR5.php
Type.php <--- MIME_Type
>Type <---- FOLDER
- Extension.php MIME_Type File
- Parameter.php MIME_Type File
assuming that Http_DOWNLOAD depends on :
* PHP 4.2.0
* PEAR 1.4.0b1
* PEAR
* HTTP_Header
* pcre extension
* Archive_Tar (Optional)
* Archive_Zip (Optional)
* MIME_Type (Optional)
* mime_magic extension (Optional)
* pgsql extension (Optional)
and I edited the paths inside each file to reflect this structure , and I tried to run the following code :
<?php
require_once 'Download.php';
$params = array('file'=>'file.zip');
$down = new HTTP_Download($params);
$down->send(true);
?>
nothing happens !! I also got a hard time trying to figure how to use the class and I think this code should work .. but not sure !
Help Please !
© Stack Overflow or respective owner