cambios hechos pero sigue descargando 'verDoc.php' en lugar de 'pagweb.pdf'
he probado con GET y con POST ( pero descarga verDoc.php de todas formas)
codigo:
documentos2.php
Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
<form action="verDoc.php" method="POST" >
<input type="hidden" name="nombrePdf" value="pagweb.pdf" >
<input type="submit" value="Descargar" >
</form>
</body>
</html>
verDoc.php
Código:
<?php
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="downloaded.pdf"');
readfile($_POST['nombrePdf']);
?>