예제 #1
0
 public static function openZip($archive)
 {
     $ata = null;
     $metadata = null;
     $data = file_get_contents($archive);
     if (!($data = JFile::read($archive))) {
         return false;
     }
     $metadata_arr = jNews_Templates::readZipInfo($data);
     if (isset($metadata_arr[0]) && is_array($metadata_arr[0])) {
         $metadata = explode("/", $metadata_arr[0]['name']);
         return $metadata[0];
     }
     return false;
     return true;
 }