avatar

Catalog
PHP ZIPARCHIVE directory structure
php
1
2
3
4
5
6
7
8
9
$flag = $zip->open($filePath, \ZIPARCHIVE::CREATE);
if ($flag!== TRUE) {
//if Linux,need check file authorization
exit("open file err="+$flag);
}
//add test.php to zip file
$zip->addFile('test.php');
// run rename
$zip->renameName('test.php','test.php');
Author: Qin
Link: https://qinhaolei.com/posts/47954/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Reward
  • WechatPay
    WechatPay
  • AliPay
    AliPay
  • Bitcoin
    Bitcoin

Comment