Problem of downloading doc. files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
B.Murali Krishna
Forum Commoner
Posts: 28
Joined: Fri May 12, 2006 2:05 am
Location: Hyderabad,India
Contact:

Problem of downloading doc. files

Post by B.Murali Krishna »

Hello Friends,

I have a problem with downloading doc. files, after downloading the file get currepted and not showing proper data,

i have written header like this

Code: Select all

header("Content-Length: " . filesize($file_path));
				header('Content-type: '.$type);
                                header("Content-disposition: attachment; filename=".$file_name);
				@readfile($file_path);

Thank u,
Murali Krishna
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Read through the advice given in the following thread. If, after following all that advice, you still can't find the culprit post back with more details.

viewtopic.php?t=64901&highlight=extraneous
Post Reply