Of course, there are other methods, which can be found online. I recommend a way to browse both http pages and wap pages, which is to use the Firefox + wmlbrowser component. Firefox with the wmlbrowser component installed can support direct browsing of wap pages.
Due to the need to dynamically output content, we have to set the suffix name of the page to .php. So how do we let the browser parse it into a wap page? It's very simple, just tell the browser the MIME type of the file when the header file is output.
Copy code The code is as follows:
header("Content-type: text/vnd. wap.wml");
?>
With the above sentence, the file extension is not important.
Next, just think of writing a PHP file. The syntax and functions are all as usual. Remember to output the XML format header at the beginning.
Copy the code The code is as follows:
echo ('');
?>
In addition, the text format must be written in wml format (also equivalent to xml). The wml specification is quite strict, and a single mistake may result in the failure to output the required page.
A wml template is as follows:
Copy code The code is as follows:
Most current WAP phones (Nokia7110, Ericsson R320S, etc.) are all encoded using UTF-8, that is, UNICODE is used for encoding. In this way, if we use Chinese characters (GB2312 encoding) directly in WML, garbled characters will be generated and mobile phone users cannot recognize them. Therefore, before we output Chinese, we must use a program or function to encode the Chinese with UNICODE. In a small number of mobile phones or WAP terminal devices that support GB2312 encoding, we can directly and correctly display Chinese characters after defining the internal code type of the document in the program.
http://www.bkjia.com/PHPjc/320232.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320232.htmlTechArticleOf course, there are other methods, which can be searched online. I recommend a way to browse both http pages and wap pages, which is to use Firefox + wmlbrowser component. Install w...