A Better Unzip

A while back I told you about a neat way to unzip files on the server.  Today I learned of a method that does the same thing, however this new method will overwrite files on the server.  This is great if you need to revert to an old version of WordPress, as I had to do this morning.

Just create a file called “unzip.php” and paste the following code into that file:

";
       system('unzip -o ' . $file);
       exit;
    }
    // create a handler to read the directory contents
    $handler = opendir(".");
    echo "Please choose a file to unzip: " . "
"; // A blank action field posts the form to itself echo '
'; $found = FALSE; // Used to see if there were any valid files // keep going until all files in directory have been read while ($file = readdir($handler)) { if (preg_match ("/.zip$/i", $file)) { echo ' ' . $file . '
'; $found = true; } } closedir($handler); if ($found == FALSE) echo "No files ending in .zip found
"; else echo '
Warning: Existing files will be overwritten.

'; echo "
"; ?>

Then upload unzip.php to the same directory as the file you want to unzip.

Then navigate to http://yourdomain.com/unzip.php and select the file you want to unzip.

Pretty neat, eh?

Many thanks to Learn CPP.

The Mighty Mo! Design Co.

RSS From Toby’s Blog

  • Where uncertainty exists, don’t order specific.
    4 Idiot Case Studies with 2 simple age-old business lessons. The post Where uncertainty exists, don’t order specific. appeared first on Toby Cryns, WordPress Trainer in Minneapolis, MN.
  • “Now THAT was a good meeting!”
    A single effective meeting can change the course of history for a company. Imagine if you could lead effective meetings EVERY DAY! You can, but it takes curiosity & practice. This article is a good place to start your journey to a more effective you. The post “Now THAT was a good meeting!” appeared first […]
  • Never Respond to RFPs & Custom Proposal Requests
    Y'all who work at normal 9-5 jobs don't need to deal with the B.S. that is an RFP process (or rather you get paid to deal with it). But us freelancers gotta deal with a whole big bag of schtuff when it comes to custom proposals. Here's my quick-and-dirty RFP filtering process that I use […]

More posts from themightymo.com

Adobe CS4 Flash MN Presentation at FlashMN

By | October 14, 2008

Below are my notes from tonight’s FlashMN meeting starring Dustin Tauer.  The presentation focused on the new features of Adobe Creative Suite 4. Illustrator CS4 Can create multiple art boards.  So, if I wanted to use artwork for the front and back of t-shirt, I would create 2 art boards (up to 100).  There are…

SPECIAL OFFER: $99 WordPress Blog!

By | July 19, 2008

For the Month of July only! Get your very own WordPress blog or static website – $99! This includes: – Domain registration for one year – Hosting for one year – Installation of your WordPress blog – Installation of SEO plugin, Akismet spam prevention, and up to 5 additional plug-ins of your choosing – Online…

Jeff Dunn Photography

By | May 30, 2008

We are pleased to release our newest Flash design for Jeff Dunn Photography! Working with our friend, Nick Bilyk, we designed and created a one-of-a-kind web experience for well-known photographer, Jeff Dunn. This new online experience features stunning transitions and accents that place Jeff’s photography front-and-center, right where it should be. It also features a…

RSS From Toby’s Blog

  • Where uncertainty exists, don’t order specific.
    4 Idiot Case Studies with 2 simple age-old business lessons. The post Where uncertainty exists, don’t order specific. appeared first on Toby Cryns, WordPress Trainer in Minneapolis, MN.
  • “Now THAT was a good meeting!”
    A single effective meeting can change the course of history for a company. Imagine if you could lead effective meetings EVERY DAY! You can, but it takes curiosity & practice. This article is a good place to start your journey to a more effective you. The post “Now THAT was a good meeting!” appeared first […]
  • Never Respond to RFPs & Custom Proposal Requests
    Y'all who work at normal 9-5 jobs don't need to deal with the B.S. that is an RFP process (or rather you get paid to deal with it). But us freelancers gotta deal with a whole big bag of schtuff when it comes to custom proposals. Here's my quick-and-dirty RFP filtering process that I use […]