In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the basic rules of writing WML programs using PHP". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the basic rules of writing WML programs using PHP"?
(1) use "" to include WML program lines written by PHP in the format:
…… (program line)
? >
(2) all program line sentences end with a semicolon (;), which is different from ASP writing WML programs.
(3) use the header keyword of PHP to declare the file type of WML. The basic format is:
Header ("Content-type:text/vnd.wap.wml")
The above format is a writing format designed for WAP browser recognition. If the user in development wants to use an ordinary browser, such as IE browser, to test the program effect, you can precede the statement with a double slash (/ /) in the format:
/ / header ("Content-type:text/vnd.wap.wml")
In this way, PC-based browsers will ignore WML tags that cannot be understood in the program, and the current program will actually become a HTML page. When you want to test on a WAP device or simulator, simply remove the "/ /" and the current page will automatically become a WML page.
What are the basic rules for writing WML programs with PHP
(4) all other WML tags and statement lines are declared using the PHP echo keyword, and each WML line is followed by a newline character "\ n" (multiple can be added as needed). Its basic format is:
Echo ("… (WML tags and statement lines)\ n")
For example, the following statement is a typical example of PHP writing a line of WML statements:
Echo ("\ n")
Moreover, the "WML tag and statement line" in the echo statement can be written successively to save lines of program code. For example, the following line of statement even writes three lines of WML's label statement:
Echo ("
")
(5) declare scripting language. This is an inheritance of PHP programming, declaring to the compiler that the current program uses a scripting language of PHP in the format:
However, this sentence can be omitted because the compiler can automatically recognize PHP scripts.
(6) the file was last saved with an extension of ".php" or ".php3" instead of an extension such as ".wml".
Thank you for your reading, the above is the content of "what are the basic rules of writing WML programs using PHP". After the study of this article, I believe you have a deeper understanding of what the basic rules of writing WML programs using PHP have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.