Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- location: ajax/
- */
- include "../configs/base.php";
- include_once "../functions/_main.php";
- $json = decryptData($_POST["params"]);
- $arData = json_decode($json);
- //print_r($json);
- $folder = folderAttachment(
- $arData->folder ?? "demo",
- $arData->date ?? "2024-12-12"
- );
- $aFile = explode("/", $arData->filename ?? "none.tmp");
- $file_url = $folder . "/" . end($aFile);
- $txt = file_get_contents($file_url);
- header("Content-Type: application/octet-stream");
- header("Content-Transfer-Encoding: Binary");
- header(
- "Content-disposition: attachment; filename=\"" . basename($file_url) . "\""
- );
- //readfile($file_url);
- die($txt);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement