note 101858 added to rarentry.extract
| From: | TorcK at osu1 dot php dot net | Date: | Fri, 14 Jan 2011 14:40:24 +0000 |
| Subject: | note 101858 added to rarentry.extract | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175744@lists.php.net to get a copy of this message | ||
How to extract all files from archive to selected dir
/**
* Extract archive $filename to $filepath
*
* @return bool
*/
function extract($filename, $filepath)
{
$res = true;
$rar_file = rar_open($filename);
if ($rar_file) {
$list = rar_list($rar_file);
foreach($list as $file) {
$file->extract($filepath);
}
rar_close($rar_file);
$res = true;
} else {
$res = false;
}
return $res;
}
----
Server IP: 213.186.192.247
Probable Submitter: 82.207.120.94
----
Manual Page -- http://www.php.net/manual/en/rarentry.extract.php
Edit -- https://master.php.net/note/edit/101858
Del: integrated -- https://master.php.net/note/delete/101858/integrated
Del: useless -- https://master.php.net/note/delete/101858/useless
Del: bad code -- https://master.php.net/note/delete/101858/bad+code
Del: spam -- https://master.php.net/note/delete/101858/spam
Del: non-english -- https://master.php.net/note/delete/101858/non-english
Del: in docs -- https://master.php.net/note/delete/101858/in+docs
Del: other reasons-- https://master.php.net/note/delete/101858
Reject -- https://master.php.net/note/reject/101858
Search -- https://master.php.net/manage/user-notes.php