On my web application, I want the user to download some information on a page and redirect after the same.
<?php header('Content-Description: File Transfer'); header('Content-Type: text/force-donwload'); header('Content-disposition: attachment; filename=Your_Fibble_Password.txt'); header('Content-Length: '.strlen($password)); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Expires: 0'); header('Pragma: public'); echo $password; header('location:./'); ?>
So Here the location header works and the page is been redirected
but the headers for the file transfer above aren't working.
Note: I can't use exit as I got some code executing below it.