Re: Parsing wml files as php

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

 



On 6/5/05, M. Sokolewicz <tularis@xxxxxxx> wrote:
> Dotan Cohen wrote:
> > On 6/5/05, Marek Kilimajer <lists@xxxxxxxxxxxxx> wrote:
> >
> >>Dotan Cohen wrote:
> >>
> >>>On 6/5/05, Marek Kilimajer <lists@xxxxxxxxxxxxx> wrote:
> >>>
> >>>
> >>>>Dotan Cohen wrote:
> >>>>
> >>>>
> >>>>>I have gone over and over through google and various archives, but
> >>>>>cannot come up with a solution even though I am convinced that this is
> >>>>>a FAQ:
> >>>>>I want to parse my .wml files. So in .htaccess I have:
> >>>>>AddType application/x-httpd-php .wml
> >>>>>AddType text/vnd.wap.wml .wml
> >>>>>
> >>>>>But it does not parse! If I remove the second line, it parses but, of
> >>>>>course, the headers are wrong. What can I do?
> >>>>
> >>>>output the right header:
> >>>>
> >>>>header('Content-Type: text/....');
> >>>>
> >>>>replace .... with whatever is right.
> >>>>
> >>>>Also, you can use php extension too, as long as the header is right.
> >>>>
> >>>
> >>>
> >>>Yes, I tried sending the correct headers with the header function. For
> >>>whatever reason, I can only send the correct headers with .htaccess,
> >>>but that makes it so that the file is not parsed as php!
> >>
> >>What did you tried with the header function? Exactly. Did you send
> >>Content-Type header?
> >>
> >>Put in .htaccess:
> >>
> >>AddType application/x-httpd-php .wml
> >>
> >>and start php scripts with:
> >>
> >>header('Content-Type: text/vnd.wap.wml');
> >>
> >>
> >
> >
> > The file starts off:
> > <?php
> > header("Content-type: text/vnd.wap.wml");
> > print"<?xml version=\"1.0\"?>
> > <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
> > \"http://www.wapforum.org/DTD/wml_1.1.xml\";>
> >
> > <wml>";
> >
> > with no white space or line breaks before the <?php.
> >
> > Dotan
> > http://lyricslist.com/lyrics/pages/artist_albums.php/402/Pink%20Floyd
> > Pink Floyd Lyrics
> 
> instead of doing something hard, try doing:
> 
> AddType text/vnd.wap.wml .wml
> AddHandler application/x-httpd-php .wml
> >>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

It's parsing now! I was using AddType instead of AddHandler... What I
was using was copy-paste from zend.com:
http://www.zend.com/zend/tut/wap.php?article=wap&kind=t&id=5033&open=1&anc=0&view=1

Should I write to them and tell them of the mistake? Or is my server
different in this respect from the average webserver?

Thank you Maciek!

Dotan
http://lyricslist.com/lyrics/pages/artist_albums.php/377/Nine%20Inch%20Nails
Nine Inch Nails Lyrics

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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