View Full Version : file download issue

11-14-2007, 06:56 AM
I am having problem with file download, It downloads file but when i try to open it it says file corrupted.

here is my code:

if (isset($_REQUEST["action"])) {
header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-length: ".filesize($file));
header("Content-disposition: attachment; filename=\"".basename($file)."\"");
} else {
echo "No file selected";

here is page link:

any idea?

11-14-2007, 05:05 PM
This needs more detail, but most questions regarding this have been answered on this page (read the comments): http://php.net/header

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum