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
Post a Comment