Redirect to a webpage
Posted: Thu Jan 13, 2011 3:53 am
Hi,
I am a novice programmer at PHP. I want to redirect my webpage to another webpage. The problem is that First I want to output a file as an attachment and then redirect the web page
I have used this code to output the attachment file
where $out is the text I want to write in my attachment file.
Now Since I have used echo here I cant use to redirect my webpage. I have also tried to use ob_start() and ob_end_flush() but then my file wont be outputted as an attachment. What should I do?
I am a novice programmer at PHP. I want to redirect my webpage to another webpage. The problem is that First I want to output a file as an attachment and then redirect the web page
I have used this code to output the attachment file
Code: Select all
header("Content-Disposition: attachment; filename=$filename");
echo $out;
Now Since I have used echo here I cant use
Code: Select all
header("location:");