PHP Learning Note 01

Source: Internet
Author: User
Tags learn php php and mysql

Example:

Why do you want to learn PHP

Subjective reasons:

Some time ago in the school to deal with the graduation of some things, back to Shanghai began to find a job journey. Intentional work is either WPF development or ASP. NET as a backend web development.

We have been interviewing for a long time, and one of the companies is very interesting, in the name of recruiting. NET development, actually enrolling in PHP development (as told in the interview notice). After the interview to feel pretty good, but still want to interview for a few days, so, the next few days, one side of the interview, while learning PHP, so that in the final decision is to go to this company, more quickly into the job.

Objective reasons:

What are the advantages of quora:php in comparison to other languages?

Using lamp to build your own amateur site is also a very low-cost way to achieve it.

The ability to switch freely in all languages is a must for programmers, so why not?

How to learn PHP

A good book:. Follow an industry classic book, Go again, to the author, is the most secure way to learn.

PHP tags for Quora

PHP tags for stackoverflow

Encounter problems more than two places to see how others are solved. Then practice more and summarize (write a blog).

The plan is like this, but a journey begins.

example of implementing the beginning of the article

In order to build the server environment of native debugging, need to install Apache, in order to enable Apache to parse PHP, need to download PHP library and modify Apache conf file. "PHP and MySQL Web development" in Appendix A, carefully explain how Windows and Linux, how to download, install, configure. The author is in accordance with the appendix step-by-step ... There are a lot of configuration instructions on the web for PHP, so no stickers are shown.

At the same time, this article does not introduce the content of HTML,CSS,JS, directly affixed with the code:

<!DOCTYPE HTML><HTML><Head>    <title>Homepage</title>    <Linkhref= "Content/site.css"rel= "stylesheet" /></Head><Body>    <Divclass= "Container">        <imgsrc= "Image/googlelogo.png"alt= "Search"class= "Headerarea"/>        <formAction= "newphp.php"Method= "POST">            <inputname= "Inputtext"type= "text"class= "Textinputarea">            <inputtype= "Submit"class= "Submitbutton"value= "Search"/>        </form>    </Div></Body></HTML>
 .container  { width : 600px ;  margin : 120px auto ;}  { width : 280px ;  height : 110px ;  margin : 30px 140px ;}  { width : 590px ;}  { width : 100px ;  margin : 10px 250px ;} 

After clicking "Search" in the example, it will post to the server's specified PHP file for parsing. such as: Enter the "ABC" and then click to search: Send the content is:

In the php file, we can get the newly sent ABC in the variable _post, with name as key:

<? PHP     $textVal $_post [' Inputtext '];     Echo ' ;     Echo ' $textVal. '? ?>

In this way, the function of the example is realized.

PHP Basic Syntax

Let's start by introducing some of the things that are relevant to PHP in the example:

The first is how to embed PHP, and embedded JS, embedded PHP also has a lot of ways. The most common is to write PHP statements in the <?php?> tag.

PHP variable to add a $ prefix and so on.

Here is a quick Reference card for PHP, with other language based students can use this card to quickly learn PHP syntax: PHP Quick Reference Card

Such as:

Note 01 finished.

The next note will contain further understanding of the PHP syntax and more examples of the knowledge points involved.

PHP Learning Note 01

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.