Home  >  Article  >  Backend Development  >  What is the difference between php and css

What is the difference between php and css

WBOY
WBOYOriginal
2022-02-11 16:43:433114browse

The difference between php and css: 1. PHP is a server language, while css is a client language; 2. php is used to process the logic layer, while css is used to make the presentation layer of the web page; 3 , PHP can dynamically generate web pages, while CSS needs to cooperate with various languages ​​to dynamically format web page elements.

What is the difference between php and css

The operating environment of this tutorial: windows10 system, PHP7.1 version, DELL G3 computer

What is the difference between php and css

php is a server-side language, and css is a cascading style sheet. It is a computer language used to express file styles such as HTML (an application of standard universal markup language) or XML (a subset of standard universal markup language). It is commonly known as Client language.

A website can be divided into two parts: art style and function. PHP is used to control program functions, while CSS is used to control art style.

css can control the page style. It can not only statically modify the web page, but also dynamically format various elements of the web page in conjunction with various scripting languages. CSS can perform pixel-level precise control over the layout of element positions in web pages, supports almost all font sizes and styles, and has the ability to edit web page objects and model styles.

php is a server-side language, a scripting language commonly used for web application development that can dynamically generate web pages.

php can be used for:

1. Collect form data

Regarding this point, the form is a commonly used data input interface for programming. When a form is submitted, the get or post methods are usually used to send the data to the PHP program script for processing.

2. Generate dynamic web pages

php runs on the server. It can dynamically output the content requested by the user through different requests from the client and running different scripts. . In short, client-request-->php server-running output-->client. In this process, the client cannot see the running process of the php program.

3. String processing

Most of the time programming is manipulating strings, and string processing skills are a necessary ability. PHP treats strings as a basic data type.

4. Dynamically output images

php uses the GD extension library to dynamically output images. For example, text buttons, verification codes, data charts, image editing, thumbnails, adding watermarks, etc.

5. Process the server-side file system

Use the file system operation function to operate the directory or file in the server. Including operations such as open, edit, copy, create, delete and file properties.

6. Writing a database-supported web page

is actually the process of using PHP scripts to run to interact with the database. First, there is a user request, and then PHP runs and interacts with the database, and the interactive result set is fed back to the client user.

7. Session tracking control

The HTTP protocol is a stateless protocol, and there is no mechanism to maintain the state between two things. Therefore, PHP uses the idea of ​​session control to track users, in order to ensure that when the user requests one page and then requests another page, he knows that the request is from the same user. It is common for major websites to save login settings and shopping carts in various malls, and save this information for users within a cycle.

8. Processing XML/json files

To put it simply, these files are processed through various extensions through PHP.

9. Supports the use of a large number of network protocols

php supports the use of various protocol services and can open original network ports so that various protocols can work together.

10. Other server-side operations

For example, online payment programs in the field of e-commerce, etc. And it can be used on all mainstream operating systems such as windows, linux, ios, etc.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What is the difference between php and css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn