php - Header redirect after download -


i new php , learning step step. i've download page want redirected after download has been completed.

header('content-type: application/octet-stream');                  header('content-disposition: attachment; filename="dlink.pdf"');                   header("cache-control: must-revalidate, post-check=0, pre-check=0");                  readfile('dlink.pdf');    header("refresh: 2; auto_works.html"); exit; 

this download code enclosed within php tag. how can achieve directive ? please help. mention me supposed write line of code

thanks

you can't redirect after download complete. webserver (which redirect) doesn't know when download complete. there ofcourse ways, they're difficult , not worth it.

you 'should' redirect after download started.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -