:::

9-6 zip.php

<?php
include_once "header.php";
include_once 'class/pclzip.lib.php';

$bak_dir      = XOOPS_ROOT_PATH . "/uploads/snews";
$remove_path  = XOOPS_ROOT_PATH . "/uploads/";
$bak_file     = XOOPS_ROOT_PATH . "/uploads/bak_" . date("YmdHi") . ".zip";
$bak_file_url = XOOPS_URL . "/uploads/bak_" . date("YmdHi") . ".zip";

$zipfile      = new PclZip($bak_file);
$zip_list     = $zipfile->create($bak_dir, PCLZIP_OPT_REMOVE_PATH, $remove_path);
if ($zip_list == 0) {
    die("Error : " . $zipfile->errorInfo(true));
} else {
    header("location: {$bak_file_url}");
    exit;
}

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbsn%3D44%26tbdsn%3D1504

書籍目錄

展開 | 闔起

線上使用者

49人線上 (8人在瀏覽線上書籍)

會員: 0

訪客: 49

更多…