note 106410 added to rarentry.extract

From: Date: Tue, 08 Nov 2011 13:27:26 +0000
Subject: note 106410 added to rarentry.extract
Groups: php.notes 
Request: Send a blank email to php-notes+get-184325@lists.php.net to get a copy of this message
This example will not work: /* example by Erik Jenssen aka erix */ $filename = "foobar.rar"; $filepath = "/home/foo/bar/"; $rar_file = rar_open($filepath.$filename); $list = rar_list($rar_file); foreach($list as $file) { $entry = rar_entry_get($rar_file, $file); $entry->extract("."); // extract to the current dir } rar_close($rar_file); Warning: RarArchive::getEntry() [rararchive.getentry]: cannot find file "RarEntry for file "***.***" (12efd9d1)" in Rar archive... It is necessary to change the line $entry = rar_entry_get($rar_file, $file); on $entry = rar_entry_get($rar_file, $file->getName()); ---- Server IP: 69.147.83.197 Probable Submitter: 195.138.168.18 ---- Manual Page -- http://www.php.net/manual/en/rarentry.extract.php Edit -- https://master.php.net/note/edit/106410 Del: integrated -- https://master.php.net/note/delete/106410/integrated Del: useless -- https://master.php.net/note/delete/106410/useless Del: bad code -- https://master.php.net/note/delete/106410/bad+code Del: spam -- https://master.php.net/note/delete/106410/spam Del: non-english -- https://master.php.net/note/delete/106410/non-english Del: in docs -- https://master.php.net/note/delete/106410/in+docs Del: other reasons-- https://master.php.net/note/delete/106410 Reject -- https://master.php.net/note/reject/106410 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184325) next »