prompting download using header()
From: mr_burns (bissatch_at_yahoo.co.uk)
Date: 07/31/04
- Next message: Andy Hassall: "Re: Check if $_GET["menu"] is null."
- Previous message: mr_burns: "cropping a string"
- Next in thread: Frank R. Suchy: "Re: prompting download using header()"
- Reply: Frank R. Suchy: "Re: prompting download using header()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jul 2004 15:25:31 -0700
hi,
i have been tryin to prompt the download of a file on the server using
the following code:
// send headers, forcing download:
header("Content-type: application/word");
header("Content-Disposition: attachment;
filename=\"files/myfile.doc\"");
...where myfile.doc in folder files is a file on the server relative
to the script:
Warning: Cannot modify header information - headers already sent by
(output started at /home/marty27/public_html/test/oarsome/test_prompt.php:8)
in /home/marty27/public_html/test/oarsome/test_prompt.php on line 10
Warning: Cannot modify header information - headers already sent by
(output started at /home/marty27/public_html/test/oarsome/test_prompt.php:8)
in /home/marty27/public_html/test/oarsome/test_prompt.php on line 11
can anyone tell me what i am doin wrong? i have read the php manual
thingy and to my primitive knowledge, this would work. any help?
cheers
burnsy
- Next message: Andy Hassall: "Re: Check if $_GET["menu"] is null."
- Previous message: mr_burns: "cropping a string"
- Next in thread: Frank R. Suchy: "Re: prompting download using header()"
- Reply: Frank R. Suchy: "Re: prompting download using header()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|