For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > October 2004 > Re: Send headers and HTML all at once









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 Re: Send headers and HTML all at once
johannes m.r.

2004-10-25, 3:56 pm

"Rob" <reply_@news_group.please> wrote:
>Is there any way to send the data in $x al at once so php does not create
>its own set of headers?


Well, PHP has a function called header(). But this won't work for you
since headers and content isn't separate in your variable.
Therefor you will have to use echo or print. PHP only creates headers
itself if you output anything. You have to start the PHP code with
<?php _in the first line_ of your file and then, before outputting
anything else you have to do a echo $x.

Sorry for my bad English, I hope it's still understandable.
Regards,
johannes
Sponsored Links







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

Copyright 2008 codecomments.com