are you sure that there's nothing in the file in before you call the
header() function? The situation you describe could happen if there was an
empty line at the begining of the file and the warnings were turned off.
When I tried your code it worked as expected:

C:\>c:\php4\php test.php
X-Powered-By: PHP/4.0.4
Content-type: text/vnd.wap.wml

<wml>
    <card>
        <p>Hello world!</p>
    </card>
</wml>
C:\>

Pavel

----- Original Message -----
From: "Rick Hodger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 5:02 PM
Subject: Re: [PHP] WML/WAP and PHP


>
> "Pavel Kalian" <[EMAIL PROTECTED]> wrote in message
> 028e01c07fc1$dffdecf0$8361d4c2@pavelk">news:028e01c07fc1$dffdecf0$8361d4c2@pavelk...
> > Hi Rick,
> > you are not doing anything wrong. You just have to send the proper
> > content-type depending on what you're outputing. For example if you want
> to
> > produce a gif image you have to use header("Content-type: image/gif");
> > There's nothing wrong with it as PHP can't predict what you want to do.
> > text/html is set as default simply because it's the type most users in
> most
> > cases need.
>
> Yes, I know that. But what I'm saying is that eg.
>
> <?php
> header("Content-type: text/vnd.wap.wml");
> ?>
> <wml>
>     <card>
>         <p>Hello world!</p>
>     </card>
> </wml>
>
> ...gets put out with a text/html content type as opposed to the specified
> text/vnd.wap.wml. Having said that, I just tried it on the linux machine
and
> it worked fine. A Windows thing?
>
> --
> Rick Hodger
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to