Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $idRecurso = isset($_POST["idRecurso"])?limpiarCadena($_POST["idRecurso"]):"";
  2.  
  3. $rspta=$recursos->descargarRecurso($idRecurso);
  4. $reg = $rspta->fetch_object();
  5. $pdf = $reg->pdf_recurso;
  6.  
  7. $ubicacion = '../files/recursos/'.$pdf;
  8.  
  9. if (file_exists($ubicacion)) {
  10. header('Content-Type: application/pdf');
  11. header('Content-Disposition: attachment; filename='.$pdf);
  12. readfile('../files/recursos/' . $pdf);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement