Raspberry Pi_Eng_24.4.3 Summary of PHP Syntax

24.4.3 Summary of PHP Syntax

If there is a static HTML tag on a web page, that page will always show the same content. However, if you use PHP to change the content of these HTML pages, the page will show the new changed contents. Like this, PHP plays a role to change the contents of a static HTML page into dynamic page. Therefore, according to the situation requested within the static HTML, a new HMTL is created and integrated with the existing static HTML tag to become an HTML document constituting a complete page.

Raspberry Pi_Eng_24.4.2 Installing PHP and Connection Tool to MySQL

24.4.2 Installing PHP and Connection Tool to MySQL

When installing PHP on Raspberry Pi, use the following command:

sudo apt-get install php5

If PHP is installed, the configurations of existing Apache are automatically adjusted so that PHP can integrate with Apache.

Raspberry Pi_Eng_24.4.11 PHP and MySQL database

24.4.11 PHP and MySQL database

24.4.11.1 PHP MySQL extension

The functions for processing MySQL data in PHP are developed and provided as extensions of PHP. The following extensions have been developed so far.

■ Original MySQL extension

This is an extension function that was originally developed to access MySQL data in PHP. It was originally developed with the assumption that it will be applied only to systems prior to MySQL version 4.1.3. It can be applied to later versions, but it can not fully utilize the functions of the latest MySQL server, and it will be discarded in the future.

Raspberry Pi_Eng_24.4.10 Transmission Methods of PHP and Key Global Variable

24.4.10 Transmission Methods of PHP and Key Global Variable

24.4.10.1 POST/GET Method of HTTP and PHP Processing

GET method and POST method can be used when a web browser calls the web server and send the necessary data.

● GET method

Raspberry Pi_Eng_24.4.1 HTML and PHP

24.4 PHP Web Script Language

24.4.1 HTML and PHP

24.4.1.1 Needs for PHP

On the Internet, all web servers use HTML to receive a request from web browser which is client, and then deliver the necessary data accordingly to the web browser to express it as a general form that human can understand. HTML (Hyper-Text Markup Language) allows a web server to communicate with a web browser and send/receive data each other, and return the processing results back to people.

Raspberry Pi_Eng_24.3.3 Summary of HTML Syntax

24.3.3 Summary of HTML Syntax

24.3.3.1 HTML Overview

HTML (Hyper-Text Markup Language) is a basic language to define Internet web page. A web page consists of HTML document in the form of a tag, is transmitted via Internet, and expressed through a web browser. HTML is used to display a desired picture and text and to define function to perform a specified operation on a specific item when a web page is displayed to a user through a web browser.

Raspberry Pi_Eng_24.3.1 Web server and Apache

24.3 Apache web server

24.3.1 Web server and Apache

24.3.1.1 Web server

By installing a web site on the Internet, people can access the site through a web browser, view the data they want, and do other various necessary works.

A web server is required to install and operate such a web site. People send various client requests to a web site through a web browser. At this time, web server is the application to perform functions that receive the request from the client, interpret the contents, perform necessary processing, and then return the web page contents of the corresponding web site to the client.