rossmurphy Posted January 12, 2008 Share Posted January 12, 2008 I've created an automatic download page that uses this code to initiate the download: header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($file)); header("Content-disposition: attachment; filename=".basename($file)); readfile("$file"); exit; This works fine. The page that this code is on also has some text that alerts the user their download is starting soon. The problem is that this page seems like it never loads. The page with the download link should send the user to the next page with this code on it and it should display some text to the user but the page never changes. Although i do know it does reach the page because the download starts. But anything below the above code does not get displayed. Does anyone know what i can do to solve tis or know of any tutorials about downloading using php. Cheers. Quote Link to comment Share on other sites More sharing options...
twostars Posted January 12, 2008 Share Posted January 12, 2008 Not to be a stickler, but this isn't O.O.P. Anything below "exit;" will not execute, as the script has been exited. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.