Home  >  Article  >  Backend Development  >  There are several types of php staticization

There are several types of php staticization

WBOY
WBOYOriginal
2022-03-09 10:43:172037browse

There are two types of staticization in PHP, namely: 1. Pure staticization. Pure staticization is divided into partial staticization and complete staticization. Pure staticization is to save the dynamic pages generated by PHP. It is a static html page; 2. Pseudo-static. Pseudo-static is still dynamic access. In essence, it is dynamically generating data to facilitate search engine inclusion.

There are several types of php staticization

The operating environment of this article: Windows 10 system, PHP version 7.1, Dell G3 computer.

There are several types of php staticization

Concepts PHP staticization is divided into: pure staticization and pseudo-staticization;

Pure staticization is further divided into: partial staticization and Completely static

Pure staticization: The dynamic page generated by PHP is saved into a static html file. The user accesses the static page instead of regenerating the same webpage every time the user visits. The advantage is Reduce server overhead,

Partial staticization: Is there partial data in the generated static file or is it obtained dynamically through ajax technology;

Full staticization: There is no dynamically obtained data situation, so the content comes from static html pages

Pseudo-static: In fact, it is still dynamic access, and its essence is to dynamically generate data.

The URL you visit is similar to "http:// yourhost,com/index/post/12" is a static address. This address is mostly seen in blog addresses. However, in pseudo-static mode, the URL you visit is actually parsed by the server and will still be parsed into something like "http:// yourhost,com/?c=index&a=post&id=12" address, so it is called pseudo-static

Advantages of pseudo-static: beautiful; easy for search engines to include Pure static implementation using PHP's built-in ob The function realizes the staticization of the page.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of There are several types of php staticization. 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