Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. $TestName = $row['TestName'];
  2. $binary = $row['PdfReport'];
  3. $binary = base64_decode($binary);
  4. file_put_contents($TestName.'.pdf', $binary);
  5. header('Content-type: application/pdf');
  6. header('Content-Disposition: attachment; filename="'.$TestName.'.pdf"');
  7. echo $TestName;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement