Get the App
SLTechnology News&Howtos  ›  Development  › 

What does static php page mean?

Shulou Source: shulou.com Published: 2022-05-31 22:45:10 10月05日 Update

This article "php page static refers to what" most people do not understand the knowledge points of the article, so Xiaobian summarized the following content for everyone, detailed content, clear steps, with a certain reference value, I hope you can read this article to gain something, let's take a look at this article "php page static refers to what" article bar.

PHP static page has two meanings: 1, PHP dynamic page saved as a static html file, the user visits the static page, rather than each time the user visits to regenerate the same page, can reduce server overhead;2, the dynamic page url address will be converted into a url address similar to the static page, easy to search engine included.

Operating environment of this tutorial: Windows 7 system, PHP7.1 version, DELL G3 computer

PHP page static concept

PHP static is divided into: pure static and pseudo-static;

Purely static: PHP generates dynamic pages that are saved as static html files, and users visit the static pages, rather than regenerating the same page every time the user visits

Advantages are reduced server overhead,

If the subdivision is purely static, it can be divided into "partial pure static" and "all pure static":

Local static: whether there is local data in the generated static file or dynamic access through Ajax technology;

Fully static: there is no dynamic data acquisition, so the content comes from static html pages.

Pseudo-static: refers to the process of converting the url address of a dynamic page into a url address similar to a static page

Pseudo-static is actually dynamic access, its essence is dynamically generated data, the URL you visit is similar to "http://yourhost,com/index/post/12", is a static address, the address is more common in blog addresses, but pseudo-static, the URL you visit is actually parsed by the server, or will it be parsed into something similar to "http://yourhost,com/?" c=index&a=post&id=12"address, so it is called pseudo-static

Advantages of pseudo-static: beautiful; easy to search engine included

Implementation of Pure Statization

Use php built-in ob function to achieve static page, roughly as follows:

I am the static content to be generated, or you can link the database to generate dynamic content here

Triggering system to generate purely static pages

Method: Add cache time to page; trigger manually

Page Add Cache Time

I am static content to generate

Tags: Static page content dynamic file configuration generation address service data server local manual user or domain name directory article virtual domain name rule Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS MariaDB Shulou Information Shulou Technology Xiaomi