Of course, there are other methods that can be searched online. I recommend a way to browse both the HTTP page and the WAP page, which is to use the Firefox + wmlbrowser component. Install the Wmlbrowser component of Firefox can support the direct browsing WAP page.
Because of the need to dynamically output content, we have to set the suffix name of the page as. PHP, so how do you let the browser parse it into a WAP page? It's simple, just tell the browser the MIME type of the file when the header file is output.
Copy CodeThe code is as follows:
Header ("CONTENT-TYPE:TEXT/VND.WAP.WML");
?>
With the above sentence, the extension of the file is not important.
The next thing is to write a PHP file on the line, grammar ah function, all the same as usual, remember to export the first XML format header at the beginning,
Copy CodeThe code is as follows:
Echo (' ');
?>
In addition, the format of the text to be written in WML format (also equivalent to XML), the WML specification is very strict, a bit of error may result in the output of the required page.
A WML template is as follows:
Copy CodeThe code is as follows:
Most of the current WAP phones (Nokia7110, Ericsson r320s, etc.) are encoded using UTF-8, which is encoded using Unicode. Thus, if we use the Chinese character (GB2312 encoding) directly in WML, it will be garbled and the phone user cannot recognize it, so we will use the program or function to encode the Chinese Unicode before exporting it. In a small number of mobile phones or WAP devices that support GB2312 encoding, we can directly display Chinese characters after defining the internal code type of the document in the program.
http://www.bkjia.com/PHPjc/320232.html www.bkjia.com true http://www.bkjia.com/PHPjc/320232.html techarticle of course, there are other methods that can be searched online. I recommend a way to browse both the HTTP page and the WAP page, which is to use the Firefox + wmlbrowser component. Install W ...