$filePath
为被压缩的文 件,$dest
为目的压缩包
function zipFile($filePath,$dest)
{
try{
$zip = new ZipArchive();
$zip->open($dest,ZipArchive::CREATE);
$zip->addFile($filePath,basename($filePath));
$zip->close();
}catch (Exception $ex){
}
}
$filePath
为被压缩的文 件,$dest
为目的压缩包
function zipFile($filePath,$dest)
{
try{
$zip = new ZipArchive();
$zip->open($dest,ZipArchive::CREATE);
$zip->addFile($filePath,basename($filePath));
$zip->close();
}catch (Exception $ex){
}
}
相关新濠天地:
最新新濠天地