How to unzip a zip file in the server.

Assume the file you want to unzip is ‘example.zip’.

1:Upload the zip file you want to unzip.

Upload the zip file ‘example.zip’ to the directory where you want to unzip it.

2:Creating and uploading unzip.php.

Create the following php file and upload it to the same directory as 1 above.

<?php

$scriptfullpath=(empty($_SERVER["HTTPS"]) ? "http://" : "https://").$_SERVER["HTTP_HOST"].$_SERVER['PHP_SELF'];

$filename="";
$filename= $_POST["filename"];

echo <<< EOM
<form method="post" action="$scriptfullpath">
<input type="hidden" name="mode" value="unzip">
-----Un Zip program-----<BR>
Input zip filename:<input type="text" name="filename" value="$filename">
<input type="submit" value="UNZIP">
</form>
EOM;

if(strpos($filename,'.zip') !== false){

$zip = new ZipArchive;
$res = $zip->open($filename);
if ($res === TRUE) {
$zip->extractTo('./');
$zip->close();
echo 'OK--unzip success';
} else {
echo 'error--unzip failed';
}
}else{

if($_POST["mode"] == "unzip"){echo 'error--this file is not zip file';}
}

?>

2:Access unzip.php.

Access the following url in your browser.

ex:https://yourdomain.com/unzip.php

※Please replace the “https://yourdomain.com/” with the url of your own website.

3:Deployment of zip.

When the ‘Input Zip file name:’ input field appears, enter the name of the zip file you want to extract, ‘example.zip’, and click the ‘Extract’ button.

4:Finish.

「OK–unzip success」is displayed and the process is complete.

Code Speed Web Without Plugin Wordpress

Without Plugin!No plug-ins! How to implement a table of contents.|WordPress

Learn how to implement a table of contents in WordPress without using a plugin. This method does not use JQuery and is also the implementation method introduced on this website. It takes less time and man-hours, if you like. The...

Continue reading

Code Web Without Plugin

The one you write in wp-config.php for now.

define( 'WP_DEBUG', false ); ini_set('display_errors','Off'); define('ALLOW_UNFILTERED_UPLOADS', true); define('WP_MEMORY_LIMIT', '100000000000000000000M'); define( 'WPMS_ON', true );

Continue reading

Arrival Shop

WordPress PWA(Progressive Web App)Best Plugin!

The right PWA plugin for WordPress can benefit your site and your customers’ experience.This article therefore presents the best PWA plugins for WordPress. 1. 1.Best PWA Plugins For WordPress2. 2.Super Progressive Web Apps By SuperPWA3. 3.Progressive WordPress (PWA) By Nico...

Continue reading

Sponsor

Frecer Sponsorship applications are now open!

We are pleased to announce that we are now accepting applications for Frecer sponsorship. Sponsor We offer a variety of plans and special offers. The funds you support will help to realise a number of projects. We sincerely look forward...

Continue reading

Plant

Aztekium ritteri

1. Habitat2. Description3. Farming Habitat Usually grows on vertical limestone cliffs. It is endemic to two remote small areas in the Nuevo León region of north-eastern Mexico. It is endangered in its habitat due to illegal collection and natural erosion...

Continue reading

Code Speed Web Without Plugin Wordpress

Without plugins!How to use syntax highlighting Prism.js.|WordPress

In this article, we will show you how to implement syntax highlighting in WordPress without using a plugin. Syntax highlighting is often used to display source code on websites and blog sites. This website has adopted “Prism.js” after various trials....

Continue reading

Plant Raise

The key points are sun, wind, water and soil! How to grow succulents.

Succulents are very easy to grow compared to other plants. There are four simple points. Maintain in a sunny location. Maintain in a well-ventilated area. Water when the soil is dry. Plant in well-drained soil. As long as the above...

Continue reading

Code Web Without Plugin Wordpress

Without plugins!How to display a blog card with internal and external link support.|WordPress

Learn how to display blog cards in WordPress without using a plugin. Plug-in non-use has various advantages, such as reducing server load and maintaining site display speed. WordPress has a large variety of plugins, but you want to customise it...

Continue reading

Code Web Without Plugin Wordpress

Without plugins!How to implement SEO features.|WordPress

Learn how to introduce policy features in WordPress without using a plugin. Plug-in non-use has various advantages, such as reducing server load and maintaining site display speed. There are many diverse plugins for WordPress, and for SEO, there are excellent...

Continue reading

Speed Web Wordpress

How to optimise page speed in WordPress.WordPress

If a web page does not load within the first two seconds, 55% of mobile users will leave that web page. Furthermore, around 70% of consumers in online stores report that page display speed is linked to their willingness to...

Continue reading

Leave a Reply

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.