Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does static php page mean?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report