Php Basic syntax

Source: Internet
Author: User
Basic php syntax 1. the first php program 1. write a suffix named helloworld. php file 2. set helloworld. put the php file in the root directory of the web server document. 3. access helloworld under web server management through a browser. php file: localhosthelloworld. php & lt ;? Phpecho & quot; basic hellowo php syntax

I. The first php program

1. compile a file with the suffix helloworld. php.

2. put the helloworld. php file to the root directory of the web server's document.

3. access the helloworld. php file managed by the web server through a browser: http: // localhost/helloworld. php

 

4. you can write html, css, javascript, and other languages in the php file. However, php fragment code will be parsed by the php application server,

The parsed code is sent to the client's browser, and other front-end code is directly sent to the client, and the client uses the browser for resolution.


II. php syntax

1. php language mark

1 .) --- >>> This is recommended. If?> If the script ends, you can skip this step.

2 .)

3 .)

4.) <%> ---> if it cannot be used, change asp_tags = Off in c:/windows/php. ini to On

5 .)

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.