ciao a tutti,
ho una pagina A.php che chiama B.php che deve semplicemente presentarmi la finestra tipo "apri o salva file":
ecco B.php
<?php
$filename = realpath($filename);
$file_extension = strtolower(substr(strrchr($filename,"."),1));
if (! file_exists( $filename )) die("File not found!");
switch( $file_extension )
{
case "pdf": $ctype="application/pdf"; break;
default: $ctype="application/force-download";
}
header("Pragma: public"); // required
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); // required for certain browsers
header("Content-Type: $ctype");
header("Content-Disposition: attachment; filename=".basename($filename).";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".@filesize($filename));
@readfile("$filename") or die("File not found.");
exit();
?>
io vorrei, alla fine dell'operazione di salva o apri file, quindi alla fine di B.php, redirigere verso C.php
ho provato a mettere in testa (e ovunque), questo script ma niente:
<script language="javascript">
location.href = "./C.php";
</script>
cosa sto sbagliando?
grazie!