For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > April 2005 > how to download an uploaded file from server using php scripting?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to download an uploaded file from server using php scripting?
sonu

2005-04-26, 8:57 am

since last ten days i am trying to solve this problem but i am not
getting clue.if any one will be knowing this please help me out of this
problem using this particular mail id.

micha

2005-04-26, 8:57 am


sonu wrote:
> since last ten days i am trying to solve this problem but i am not
> getting clue.if any one will be knowing this please help me out of

this
> problem using this particular mail id.


header("Content-type: YOUR_CONTENT_TYPE");
header("Content-Disposition: attachment; filename=YOUR_FILE_NAME);
//now write out out the file data

the file should be accessible from the $_FILES array. note that sending
header works only if no output has been sent by the script before.

micha

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com