RE: Header problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> Header must come first (before you output anything) or you get a parse 
> error

I try to better explain ...

HTTP works like this: you ask something, you receive something, html and texts are just one option.

Your example page mess up html, zip, everything, because when you download a file you still have the rest of the page sent in the output.

A download should have ONLY file related info/headers and nothing else in the output ... echo/print in the middle of the code before an header is an error, everything in output before an header is an error, everything after headers that is not related to that header is an error, got my point?

To decide how a page should behave, you must be able to do not produce anything except the expected output with expected headers, that's why I have said headers are fundamental for a response, we cannot play with outputs however we want. 

As summary, once you have created and tried a dedicated page without a single white space or print before, during, or after the dedicated download stuff, I'll try to understand where is the error.
Otherwise it could be everything, and I am against "magic behaviors" ... you need to download? Well, create a file which aims id to download and nothing else, or you gonna constantly find these kind of problems in your applications.

Regards
 		 	   		  
_________________________________________________________________
Keep your friends updated—even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux