[Collection] Method for generating static pages

xiaoxiao2021-03-05  22

The specific implementation has both methods 1. Manage the back table to add a record, directly generate the target HTML page, and the front call connection directly points to the generated HTML page. This method is the highest in program efficiency. The server load is light, but since the generated pure static page, once the page style (template and CSS = theme) changes, all content pages must be regenerated. So the application in actual use is generally not too much. More is the use of clients such as JS, SSI, XML / XSL, and only save data in the generated static file, does not involve styles, so that speed and maintenance balance can be achieved, but it is complex relative to the front and backbound procedures (application) When this method, since the content is pure static, it can be used with a separately compiled pure static Apache .. Efficiency and resource occupation is better than including dynamic content support) ==== Supplement: a. Top changes Style, to regenerate all content pages, you can use: >>>> within the page can be embedded in each of the generated pages to determine if needed Regenerate this page. >>>> Apache's ErrorDocument404 function, but here the front link is to HTML, if the HTML does not exist, will regenerate the function of redirection to the 404 handler via Apache file (Note: httpd.conf 加 加 d 404 /ERRPROCESS.PHP Directive, using this feature to solve the problem of modifying the website style, updating all generated HTML files, deleting the entire Static folder. B. Call the PHP by embedding