注册
登录

您现在的位置是:首页 > 学无止境

php的zip扩展应用例子

木木彡82 2010-05-12 09:43:00 390人围观
$zip = new ZipArchive;$res = $zip->open(UPLOAD_DIR./attach.zip, ZIPARCHIVE::CREATE);if ($res === true) {       foreach ($fileinfo as $value) {    ...

$zip = new ZipArchive;
$res = $zip->open(UPLOAD_DIR.'/attach.zip', ZIPARCHIVE::CREATE);
if ($res === true) {
       foreach ($fileinfo as $value) {
             $zip->addFile(UPLOAD_DIR.'/'.$value['SAVE_NAME'], $value['REAL_NAME']);
      }
      $zip->close();
}

文章评论

  • 登录后评论

点击排行