note 113489 added to ziparchive.extractto

From: Date: Fri, 18 Oct 2013 08:11:28 +0000
Subject: note 113489 added to ziparchive.extractto
Groups: php.notes 
Request: Send a blank email to php-notes+get-196581@lists.php.net to get a copy of this message
Be careful about a adding filenames that start with a slash '/' to your zip archives and then extracting them by name: <?php $zip->addFromString('/file.txt', 'file contents'); // adds file.txt to archive's root $zip->extractTo('dir/to/extract/'); // works, creates dir/to/extract/file.txt $zip->extractTo('dir/to/extract/', '/file.txt'); // works $zip->extractTo('dir/to/extract/', 'file.txt'); // fails ?> ---- Server IP: 69.147.83.199 Probable Submitter: 178.255.169.75 ---- Manual Page -- http://php.net/manual/en/ziparchive.extractto.php Edit -- https://master.php.net/note/edit/113489 Del: integrated -- https://master.php.net/note/delete/113489/integrated Del: useless -- https://master.php.net/note/delete/113489/useless Del: bad code -- https://master.php.net/note/delete/113489/bad+code Del: spam -- https://master.php.net/note/delete/113489/spam Del: non-english -- https://master.php.net/note/delete/113489/non-english Del: in docs -- https://master.php.net/note/delete/113489/in+docs Del: other reasons-- https://master.php.net/note/delete/113489 Reject -- https://master.php.net/note/reject/113489 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196581) next »