User Login    
 + Register
  • Main navigation
Login
Username:

Password:


Lost Password?

Register now!
Who's Online
90 user(s) are online (3 user(s) are browsing XoopsWiki)

Members: 5
Guests: 85

summary, ofvirkur, sakyant, trabis, ghia_, more...
Documentation
Nominate XOOPS!!!!
[Main Page]

Dev:ZipDownloader Class

From XOOPS Project

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy
Category: Development

One tip for creating zips without the full path in the zipfile, is to use the chdir() command before adding files to the zip archive. When unzipping these files, they will not have too many subdirectory folders. Heres a stepbystep for using this class:

1. include the zipdownloader class (include_once XOOPS_ROOT_PATH."/class/zipdownloader.php"; ) 2. instantiate the object ($object = new ZipDownloader(); ) 3. chdir to the directory of the file 4. $object->addBinaryFile($filename) ...repeat, rinse 5. $object->download($name) ($name should be the new name you would like the file to be called on the client system. Also, .zip is automatically appended to this, so you would leave the extension off.)


$object->download() sends the zip file directly through HTTP to the requesting client.


Back to Main Page

Retrieved from "http://www.xoops.org/modules/mediawiki/index.php/Dev:ZipDownloader_Class"

This page has been accessed 342 times. This page was last modified 17:23, 15 December 2007. Content is available under XOOPS Project.


Powered by
XOOPS Code hosted on SourceForge

Powered by PHP



Powered by MySQL

Powered by Smarty

OSI certified

All content on this site is subject to the Creative Commons License
Local Support Sites