PHP Classes

File: installer.php

Recommend this page to a friend!
  Classes of Alfredo Rodriguez   aaPanel Autocreate Subsite   installer.php   Download  
File: installer.php
Role: Example script
Content type: text/plain
Description: Example script
Class: aaPanel Autocreate Subsite
Manage sites hosted in a server using aaPanel
Author: By
Last change:
Date: 1 month ago
Size: 366 bytes
 

Contents

Class file image Download
<?php
$file
= 'miSite.zip';

// get the absolute path to $file
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);

$zip = new ZipArchive;
$res = $zip->open($file);
if (
$res === TRUE) {
 
// extract it to the path we determined above
 
$zip->extractTo($path);
 
$zip->close();
  echo
"WOOT! $file extracted to $path";
} else {
  echo
"Doh! I couldn't open $file";
}