21 lines
545 B
PHP
21 lines
545 B
PHP
<?php
|
|
|
|
$zipPath = "storage/documents/013_Others/zip_files/";
|
|
@mkdir($zipPath, 0777, true);
|
|
|
|
if(getisset("path")){
|
|
$pdfDirectory = get("path");
|
|
$pdfDirectory = "storage/documents/$pdfDirectory";
|
|
}
|
|
|
|
//$zipName = str_replace("storage/documents/", "", $pdfDirectory);
|
|
$zipName = get("name");
|
|
|
|
$zip_file = "$zipPath/$zipName.zip";
|
|
$command = "zip -r -j '$zip_file' '$pdfDirectory' ";
|
|
dump(shell_exec($command));
|
|
|
|
//shell_exec("rm -r '$pdfDirectory' ")
|
|
?>
|
|
<a href="{{url($zip_file)}}" class="btn btn-primary">{{e2("Download Zip File")}}</a>
|