note 129233 added to ziparchive.addglob
| From: | hkn06tr at gmail dot com | Date: | Sat, 10 Feb 2024 17:24:16 +0000 |
| Subject: | note 129233 added to ziparchive.addglob | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221187@lists.php.net to get a copy of this message | ||
The following all works:
---------
Ex-1:
Nearly all files for 5 level recursively are zipped:
$zip->addGlob("*.*");
$zip->addGlob("*/*.*");
$zip->addGlob("*/*/*.*");
$zip->addGlob("*/*/*/*.*");
$zip->addGlob("*/*/*/*/*.*");
$zip->addGlob("*/*/*/*/*/*.*"); // 5th
---------
Ex-2:
$zip->addGlob("library/*.*");
all files under library
---------
Ex-3:
$zip->addGlob("*/*.[cpj]*");
Means all files starting with cpj
So they all included
css
php
js
---------
Ex-4:
$zip->addGlob("*/*.[cpj][sh]*");
Take guarantee:
css
php
js
---------
Ex-5 Bonus:
More complicated:
$zip->addGlob("[ab]*/c*/*.[cpjth][shxt]*");
All folder starting with a or b and then in subfolder must start with c but only those files:
css php txt js html
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.131 (proxied: 185.34.130.12)
----
Manual Page -- https://php.net/manual/en/ziparchive.addglob.php
Edit -- https://main.php.net/note/edit/129233
Del: integrated -- https://main.php.net/note/delete/129233/integrated
Del: useless -- https://main.php.net/note/delete/129233/useless
Del: bad code -- https://main.php.net/note/delete/129233/bad+code
Del: spam -- https://main.php.net/note/delete/129233/spam
Del: non-english -- https://main.php.net/note/delete/129233/non-english
Del: in docs -- https://main.php.net/note/delete/129233/in+docs
Del: other reasons-- https://main.php.net/note/delete/129233
Reject -- https://main.php.net/note/reject/129233
Search -- https://main.php.net/manage/user-notes.php