• Archives

  • AddThis Social Bookmark Button

    Add to Technorati Favorites

  • Upcoming Conferences

    • no upcoming events
  • Archive for May, 2008

    opening and extracting a zip file

    Thursday, May 1st, 2008

    Well zipping is not a php function. For the zipping functions to work on your server you must download the

    Download the ZZIPlib library

    Download the Zip PELC extension

    And install them ( find the instruction there only on how to )

    The example i am going to tell is a simple one

    <?php
    $zipfile = new ZipArchive;
    $zipfile->open(‘file.zip’);
    $zipfile->extractTo(‘./’);
    $zipfile->close();
    echo
    “the requested file has been extracted”;
    ?>

    open = open the specified zip file inside the braces

    extractTo = extract the opened zip file to the location specified

    close = closes a zip file

    Thanks

    krates

    Share and Enjoy:
    • Digg
    • del.icio.us
    • Facebook
    • NewsVine
    • Reddit
    • StumbleUpon
    • YahooMyWeb
    • Google Bookmarks
    • Yahoo! Buzz
    • TwitThis
    • Live
    • LinkedIn
    • Pownce
    • MySpace