[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-bugs
Subject:    [DOC-BUGS] Doc #77500 [Opn->Nab]: ZipArchive::getFromName works with path, not just name
From:       remi () php ! net
Date:       2020-03-18 12:38:47
Message-ID: E1jEXyB-0001cA-Sk () bugs ! php ! net
[Download RAW message or body]

Edit report at https://bugs.php.net/bug.php?id=77500&edit=1

 ID:                 77500
 Updated by:         remi@php.net
 Reported by:        jave dot web at seznam dot cz
 Summary:            ZipArchive::getFromName works with path, not just
                     name
-Status:             Open
+Status:             Not a bug
 Type:               Documentation Problem
 Package:            Zip Related
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please propose a documentation change.


Previous Comments:
------------------------------------------------------------------------
[2019-01-22 16:14:39] jave dot web at seznam dot cz

Description:
------------
Documentation for ZipArchive::getFromName is misleading.
The first parameter is actually a relative (to root of the archive) path, docs say \
"Name" which can falsely imply file would be found just by its filename, which \
doesn't happen when it is inside a directory.

To get to a deeper file, you must specify the path like:
$zip->getFromName('subFolderTest/test.txt');

---
From manual page: https://php.net/ziparchive.getfromname
---


Test script:
---------------
//considering archive structure
//subFolderTest (d)
// - test.txt (f)
// - test2.txt (f)

$zip->getFromName('test.txt'); //this will not find anything
$zip->getFromName('subFolderTest/test.txt'); //this will find the file



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=77500&edit=1

-- 
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic