mime types - How can I use a wml script in php files? -


i'm having problems using wml script in wml site, when try call function browser download wmls file.

my server has mime types wml

this example of wml code embedded in php file

  <?header("content-type: text/vnd.wap.wml");?>   <?echo('<?xml version="1.0" encoding="utf-8"?>');?>   <!doctype wml public "-//wapforum//dtd wml 1.2//en" "http://www.wapforum.org/dtd/wml12.dtd">   <wml>     <card>       <p>         <b>wmlscript</b><br/>         <a href="wmlscriptfile.wmls#helloworld()">run wmlscript</a><br/>         $(message)        </p>     </card>   </wml> 

this wmlscript code in wmls file

extern function helloworld() {   wmlbrowser.setvar("message", "hello world. welcome our wmlscript tutorial.");   wmlbrowser.refresh(); } 

i'm trying insert wmlscript in php file changing mime type in header browser download file again

<?header("content-type: text/vnd.wap.wmlscript");?> 

the point not sending proper mime type, having client knows how handle mime type.

you need client/browser understands wml is.

there firefox addon fx 3.5 , 4 – don't know if still works recent fx versions.

wikipedia knows that: “as of 2013, wap use has largely disappeared in europe , united states.”


Comments