Use the following PHP lines to force the browser to download any file (ex: HTML file) rather than opening in the browser window
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=FILE_NAME");
echo file_get_contents("/FILE_PATH");
Tweet
No comments:
Post a Comment