array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'rarentry.getversion.php', 1 => 'RarEntry::getVersion', 2 => 'Get minimum version of RAR program required to unpack the entry', ), 'up' => array ( 0 => 'class.rarentry.php', 1 => 'RarEntry', ), 'prev' => array ( 0 => 'rarentry.getunpackedsize.php', 1 => 'RarEntry::getUnpackedSize', ), 'next' => array ( 0 => 'rarentry.isdirectory.php', 1 => 'RarEntry::isDirectory', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rar/rarentry/getversion.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL rar >= 0.1)
RarEntry::getVersion — Get minimum version of RAR program required to unpack the entry
Returns minimum version of RAR program (e.g. WinRAR) required to unpack the entry. It is encoded as 10 * major version + minor version.
Diese Funktion besitzt keine Parameter.
Returns the version or false
on error.
Beispiel #1 RarEntry::getVersion() example
<?php
$rar_file = rar_open('example.rar') or die("Failed to open Rar archive");
$entry = rar_entry_get($rar_file, 'Dir/file.txt') or die("Failed to find such entry");
echo "Rar version required for unpacking: " . $entry->getVersion();
?>