prompting download using header()

From: mr_burns (bissatch_at_yahoo.co.uk)
Date: 07/31/04


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



Relevant Pages

  • Re: Problem Updating New Messages from NTTP News Server OE
    ... > as far as I know and he doesn't have a server in his setup. ... download the answer to a problem he had posted in the Outlook group and I had seen the answer almost immediately on July 1. ... sure how taking the check out of the download headers boxes would have helped. ... pane 3) Get headers at a time 4) No check in mark all messages as read when exiting newsgroup ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Problem Updating New Messages from NTTP News Server OE
    ... What's the precise difference between Tools>Syncronize Newsgroup Get a) all messages b) new messages c) headers only ... first check to see if the server now has it by ... > download the answer to a problem he had posted in the Outlook group and I had seen the answer almost immediately on July 1. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Problem Updating New Messages from NTTP News Server OE
    ... the discussion based on its headers. ... So I would be less inclined to blame the server and more inclined to blame ... feature anywhere within a newsgroup and synchronize that newsgroup with ... either the Synchronize Newsgroup or the Synchronize Account command. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: IP number question
    ... |> I can present a posting whose headers *claim* whatever IP address ... machine is running a news server and that you have completely formatted ... articles ready to pass along -- articles which might have originated ... There is nothing that would -prevent- nntp servers from adding trace ...
    (comp.security.misc)
  • Re: Help please. Outlook express or comcast is creating misleading mail headers
    ... and go down to the "Outgoing Mail Server" section. ... > headers, but the smtp mail host that comcast uses now includes that in all ... MTA, and the aosake.net MX. ... that the filters are working for. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)