Code does not execute after header
Posted: Tue Apr 02, 2013 7:18 pm
OK, so i figured out how to upload to the server, and then, using 'header' to save the file to the location of the users choice, with the code below:
the only issue is, there is more code afterwards that does not execute, namely a simple re-direct to the page where the call came from in the first place:
the header forces a save as dialogue box to pop up, which i like, but after i save the file, the refresh does not fire.
how can i make the underlying page refresh after saving the file?
TIA
Code: Select all
header("Content-type: application/pdf");
header("Content-Disposition:attachment; filename=" . $file_name);
header("Content-Length: " . filesize($file_name_));
readfile("cfiles/" . $file_name);
Code: Select all
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=upload.php?file_id=<? echo $file_id; ?>">
</head>
</html>
how can i make the underlying page refresh after saving the file?
TIA