Re: Redirect after pdf / file download

From: Date: Thu, 12 Jun 2008 10:57:19 +0000
Subject: Re: Redirect after pdf / file download
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-275260@lists.php.net to get a copy of this message
Aschwin: Hi i tried ------------------------------------------------------------------------------------------ //echo '<script type="text/javascript">'; //echo 'window.location.href="3.html";'; //echo '</script>'; header("Location: 3.html"); exit; ------------------------------ but that did not work :(. thanks for the tip. yashesh bhatia > > Hi, > > What you are doing is: > > header("Content-Type: application/pdf"); > > And after that you try to echo some script. But the browser already thinks > that belongs to the PDF and not to a HTML page. > > What I think should work instead of the script part is just: > > header('Location: 3.html'); > exit; > > But I'm not sure it works. > > -- > > Aschwin Wesselius > > 'What you would like to be done to you, do that to the other....' >

« previous php.general (#275260) next »