About WAP programming

xiaoxiao2021-03-06  23

First we need some preparatory knowledge, such as understanding the basic knowledge of the Internet, HTTP protocol and its connotation; B / S structure work principle, browser and server communication method, Of course, if you can be familiar with JS, XML coding specification better

Prepare knowledge is so much (no too much -_- !!)

Ok, now we start: I want to cut the tree quickly, good ax is essential, now we need to engage in some tools, such as WAP mobile simulator, with him, you can test your WAP page, WAP There are a lot of programming tools, you can download from Phone.com Inc., NOKIA or Ericsson website.

Below we develop as a pHONE.COM's UP.SDK. First, write the WML script to write the first WAP page with any text editor, here I name this file ff.wml, and create a subdirectory EX in your Web server's documentroot directory, will ff. WML exists in this directory. Notes : Those familiar with XML know that the above two sentences are XML preambles, indicating that the document meets the XML version 1.0 and follows //www.phone.com/dtd/wml11.dtd document type. Note: The WAP page begins with tag, like a web page starts as the tag. Next, there are many physical segments, CARD is a display page in the WAP page, and a WAP web page can have multiple display pages.

Type you expected pay: Note: Represents a submission button, similar to the Submit button in the FORM in HTML. represents a submission link, that is, the mobile phone user presses the HOWMUCH submission button, the ID name is the display page of 'result'.

Congratulations,

The salary you expect is: $ SALARY! Note:

you The expected salary is: $ SALARY! Display strings and numbers entered in text input boxes.

is similar to the Web page. indicates the end of the entire WAP page.

Second, the server is configured in design WAP web pages whether you use the WAP development tool is a UP.SDK or Nokia WAP Tookit or Ericsson Wapide, you must perform server settings, so you will introduce a common settings of several web servers here. As follows: 1. Window NT platform IIS: A, Startup Menu -> Program -> Windows Nt Option Pack -> IIS4.0; B, right-click the sub-computer name of Internet Information Server, select 'Properties on the shortcut menu ; C, at the lower part of the property page, there is a 'file type (f)' button, click this button, the file type interface will appear; D, click the 'New Type' button, then in the relevant extension list Fill in .WML, fill in the text / vnd.wap.wml; e, click 'OK' button; F, repeat C, D, E three steps, add other MIME types; 2, Apache Web Server ON NT or Solaries or Linux or other versions of UNIX: A, whether NT or UNIX or Linux is a conf / mime.types file in the Apache installation directory; B, add the following in this file: Text / vnd.wap.wml .wmlimage / vnd.wap.wbmp .wbmpapplication / vnd.wap.wmlc .wmlctext / vnd.wap.wmls .wmlsapplication / vnd.wap.wmlsc .wmlscc, store; D, restart Apache Web Server is OK! Heart, after you install Up.sdk, click Programs from Windows Start menu -> UP SDK 4.0-> Up.simulator Enter this file in the URL address bar, ie http : //localhost/ex/ff.wmL Enter, you can press the digital key input on your phone. Fourth, Conclusion, in short, it is not difficult to see the WAP page written in WML scripting, and people who are familiar with XML will find that WML language is based on XML specification. But truly WAP web design is not only familiar with WML language and XML specification, but also familiar with WMLScript, HDML. WMLScript is similar to JavaScript language. If you design a dynamic WAP page, learn how to design a WAP server-side program. Designing WAP server-side programs and design web server are similar, but to follow WAP protocols, the designs used in the design can be any programming language such as C / C , Java, VB, ASP, Perl, PHP, FoxPro, etc. Wait. The difference and similarity of both of the two will be discussed in detail in the later advanced programming guidance. PS: Since the WAP browser and WAPGATEWAY SERVER are currently limited to Chinese characters, some programs now require character set transformation. In the future, the degree of support for Chinese characters will not be required.

转载请注明原文地址:https://www.9cbs.com/read-43562.html

New Post(0)