Knowledge required before learning php, learning php knowledge _ PHP Tutorial

Source: Internet
Author: User
Learn the knowledge required before learning php and the knowledge of php. Knowledge required before learning php, learning php knowledge 1. static website and dynamic website A) static website: websites that do not support data interaction (suffix: .html.htm) B) dynamic website: knowledge you need to know before learning php, learning php knowledge
1. static websites and dynamic websites

A) static website:

Websites that do not support data interaction (suffix:. html. htm)

B) dynamic website:

Websites that support data interaction, dynamic websites can be placed on static webpages

I. Technologies for implementing dynamic websites

1. Asp. asp

2. php. php

3.. net. aspx

4. Java. jsp

2. client and server

A) client: the computer used by the browser

B) server: The machine that Stores website code

C) the client sends a request (HTTP request) to the server. the server sends static resources (html, code, images, js, and CSS) to the client (HTTP response ), the client parses the returned code through a browser to form the page we see.

3. Port and port number

A) the port is the entrance to the service operation, similar to the door of the building.

B) port number: the door number. The value range is 0 ~ 65535

C) how to check whether the port number is used.

Win + R and enter cmd to enter the command line

Enter netstat-ano

D) port 80 is generally reserved for WEB servers, Port 21 for FTP, and port 25 for email servers.

4. BS and CS architecture

A) BS architecture

B: brower browser

S: sever server

Access the server through a browser

B) CS architecture

C: client

S: sever server

Access the server through a client software

Example: qq, stock trading software

5. foreground and background

A) front-end: The browser interface

B) background: administrator interface, which is used to operate data on the foreground.

6. sites, virtual directories, and virtual hosts

A) site: folder for storing website content

B) virtual directory: a folder with permissions

C) virtual host: folder with permissions + domain name + Port

7. change the virtual directory

Because the PHP operation requires apache support, the php directory should inform apache to configure the php virtual directory in the apache large configuration file.

Open the apache configuration file and search for documentroot (the configuration file is case insensitive)

Enter http: // localhost/text. php (modified virtual directory) in the address bar of the browser. the reason why the specified page cannot be opened is found: no access permission is set for the changed directory.

Solution: in the apache configuration file, set the permission of the specified folder to allow from all.

Change method:

1. find the http. conf file under wampwerver \ bin \ apache \ apache2.4.9 \ conf \. open the file and enter vhosts to find it. find the location and remove the previous #

2. locate the httpd-vhosts.conf under wampserver/bin/apache/apache2.4.9/conf/extra, open and add the following code at the end of the text

DocumentRoot "D:/wamp/www/web1 /"

DirectoryIndex wo. php

ServerName www.sina.com

3. modify the C:/WINDOWS/system32/drivers/etc/host file, open it in notepad, and add the following content:

127.0.0.1 www.sina.com

Note: D:/wamp/www/web1/is the root directory of the website project.

7. change the home page

Find directoryindex in the apache configuration file. this command sets the homepage of the website.

9. change the listening port

Listen

Browser request format: http: // URL [: port number]/php page

If the port number is 80, the port number can be omitted.

10. DNS resolution

A) DNS: the domain name resolution system. Enter the domain name in the browser, first analyze the IP address corresponding to the domain name on the nearest DNS server (the nearest DNS resolution server is the local server), and then access the server through the IP address.

The local DNS resolution database is in "C: \ Windows \ System32 \ drivers \ etc \ hosts"

11. PHP syntax features

PHP keywords are case-insensitive and variable names are case-sensitive.

1. static websites and dynamic websites A) static websites: websites that do not support data interaction (suffix: .html.htm) B) dynamic websites :...

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.