Author: q3boy
Static page generation generally has so many ideas.
1. During the program writing process. Statements that do not use direct output. When all outputs are connected to the output string, the output is completed. Write the output string content directly to the file
2. Written in the normal way. The output is captured through the OB function group. Then write the output to the file
3. When using a template class, the output is obtained using a Get/fetch-type method. and write to the file.
There are two ways to achieve this.
1. When adding records in the admin background, the target HTML page is generated directly, and the foreground call connection points directly to the generated HTML page. The advantage of this method is that the program is most efficient. Server load is light, but because a purely static page is generated, all content pages must be regenerated once the page style has changed. So the actual use of the application is generally not too much. More is the use of client-side means such as js,ssi,xml/xsl, generated by the static file only save data, no style, so that can achieve speed and maintenance balance, but relative to the front and back of the program is more complex (when applying this method, because the content is pure static, Can be used with the purely static Apache that is compiled separately. More efficient and resource-intensive than dynamic content support
2. The front-desk access link points to the PHP program, and the PHP program first checks for the presence of the corresponding static file. If the static file does not exist. is generated and redirected to this file, otherwise directly redirected. This approach is actually used in conjunction with Apache's url_rewrite functionality. The PHP file address in the form of HTML, in favor of search engine retrieval. This method has a slight loss in efficiency, but the program structure is simple and easy to adjust, it is suitable for use when the traffic is not very large.
http://www.bkjia.com/PHPjc/532002.html www.bkjia.com true http://www.bkjia.com/PHPjc/532002.html techarticle Author: q3boy Static page generation generally has so many ideas. 1. During the program writing process. Statements that do not use direct output. And when all the output is connected to the output string, ...