Site 3: PHP web page cash

Source: Internet
Author: User
Website Creation 3: PHP web page implementation 1. Related concepts 1. & nbsp; Php-Html relationship: Php execution on the frontend, static, and client: backend, dynamic, and server-executed Html can contain Php, and Php can generate html2. & nbsp; & ter3: PHP web page implementation
1. Related concepts

1. relationship between Php and Html
Html: frontend, static, and client execution
Php: backend, dynamic, and server execution
Html can contain Php, and Php can generate html

2. relationship between Php and Javascript
Php is a server-side script, and Javascript is a client-side script. it has different functions and can be used together.
For example, the onclick of button in Form can call Javascript functions, but cannot call php functions.
Javascript cannot process server-side data.

3. web terminology
Css: controls how webpage content is displayed
Div: Div label is used to define the display mode (such as the background, font, and alignment mode) of a region)
Style: The Style label is used to set the css format table.
Meta: the Meta tag contains hidden information about some webpages.

II. webpage implementation

1. we recommend that you use DreamWeaver to design the webpage and then manually edit it.

Set page properties (background, screen width, link display, etc.), add text images, etc.

For general websites, you need to design the page header and footer (single-write files can be included by multiple page networks)

2. web page adaptation browser analysis rate
Set the width with percentages: width: 100%
Set the maximum width: max-width: 800px

3. webpage adaptation to Android mobile phone resolution (without affecting the computer browser effect)
Set the default screen width of the mobile phone to 320


4. how to solve Chinese garbled characters?
Garbled characters may be caused by the failure of the browser to recognize the Chinese character set in HTML. you must specify the character set at the beginning and add

Or

5. how do I remember the previous selection in the previous page form when I return to the previous page?
Add at the beginning of the previous page
Header ('cache-control: private, must-revalidate');?>

6. return to the implementation of the previous page button
Echo "";

III. PHP implementation

1. basic PHP syntax: Similar to C language

2. PHP notes: use //,/*, *, and */in the same way as C //,/*,*/

3. PHP debugging: echo, print_r () debugging is generally used.

4. PHP single quotes and double quotes: the output in double quotes is interpreted, and the output in single quotes is directly

5. define functions in PHP
Function sum ($ a, $ B ){
$ C = $ a + $ B;
Return $ c;
}
Various types of return values are supported.

6. pass parameters: Use GET to pass parameters.

1) caller
Echo "\ n ";

2) acceptor
$ Value = $ _ GET ["test"];
You can get xxxxx

7. how to press enter
Press enter on the webpage"
"
In Html code, press enter as "\ n"

8. why sometimes the empty function cannot judge null values?
The empty function returns true if the value is null or zero.

IV. debugging precautions

1. Android mobile phone debugging
It is best to debug in the Android browser. the UC Browser will remember the user's scaling ratio, which may lead to ambiguity.

2. computer debugging
It is best to use IE6 for debugging. the old browser can support it, and the new browser is normal (some IE6 parameters are not recognized, and some PNG images are not transparent)

V. References

1. Html form
Http://www.sj33.cn/jc/wyjc/htjc/200612/10726_2.html

2. button links in common forms
Http://www.cnblogs.com/infim/archive/2010/08/23/1806400.html

3. Php operations on Mysql databases
Http://www.189works.com/article-49493-1.html
Http://www.jb51.net/article/14668.htm

4. Php parsing Xml
Http://www.php100.com/html/webkaifa/PHP/PHPyingyong/2012/0110/9638.html

5. Android screen adaptation
Http://mobile.51cto.com/web-316935.htm

6. websites implemented by the Author
Http://oatmental123.sinaapp.com


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.