Basic Introduction to PHP

Source: Internet
Author: User

Although we do the previous paragraph, but it will be and the back end have contact, but also to know some of the basic knowledge of the backend, first of all about the server it. First of all, in the case of no net, we want to do dynamic transmission is to use the local loopback, so know the local loopback address is HTTP://127.0.0.1/. There is to understand some basic definition, the server is essentially a computer, but not I use the home computer, so we just understand some basic differences can be, the server's memory, performance, work longer, and the system is not the same, the household is usually window and so on, And the server is Linux,window service and so on, the household is generally cool, gorgeous, and the server is stable-oriented, the server is to provide some kind of function, we generally common server software has appclie,iis,tomcat. Server Common software Framework There are two, not the CS and BS, they are different, CS is required for the client, it is generally used in the game, BS is used on the browser, do not need the client, convenient to use, do not need to download, general various pages on the. The main thing is the basic use of PHP, we do not need to understand PHP in-depth, but the basic will be using its syntax. 1: Know how it is defined: $name. 2: It inside the loop statement, the judgment statement of the variable how to write, the big frame, is to add a $ in front of the variable. For example:

3: To use multiple data, to use the array, writing and JS are also some different:

(1) Normal array:

(2) An array of relational types:

4: All things we have to write in a tag, PHP also has a tag is: <?php Here is writing content?>

5: Want to output, write echo in the label, followed by the output content.

In writing basic grammar is to pay attention to the following points in the wrong place:

1: In the PHP name, can not use Chinese, the path can not have Chinese.

2: After each sentence must add the Terminator ";", if not added will be an error.

3: Open mode, we write static pages are directly right click Open, here is not open, you must enter the server address open.

4: When using an array, be aware that this is not used [], but instead uses ().

When using PHP, we typically use table cells to get the contents of a FORM element.

These elements must be set in the form, the action and Mothod properties must be set in form tags, the action is to commit the Url,mothod is the way to commit, it has two ways, is get and post, they function is the same, just get commit, Can be seen in URLs, and post submissions are not visible and more secure.

The submission method is set in HTML, and the corresponding method in PHP is: $_get[key] and $_post[key].

In PHP we can also write some files and read some files, that is, we get the data in the HTML to store him, which requires us to build a Tetx file, and then we can put the things we got.

It can also be returned to the user after it is stored in:

In order to make the PHP page look better, we can embed PHP in the HTML.

Basic Introduction to PHP

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.