Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function download($file_Fake_Name) {
- $path = $_SERVER['DOCUMENT_ROOT'].'/uploads/files/resumes/';
- $file_Actual_Name = $path . 'test_file.pdf';
- @readfile($file_Actual_Name);
- header('Content-type: application/pdf');
- header('Content-Disposition: attachment; filename="' . $file_Fake_Name . '"');
- header('Content-Transfer-Encoding: binary');
- header('Content-Length: ' . filesize($file_Actual_Name));
- header('Accept-Ranges: bytes');
- exit;
- }
- http://test.home/download/baacb87cfe26a544c94a5b5e9072b809.pdf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement