Home > Backend Development > PHP Tutorial > Typecho single entry access?

Typecho single entry access?

WBOY
Release: 2016-07-06 13:52:09
Original
1207 people have browsed it

I know that typecho is a single entry. Every time you access the page, you access the content of the index, and call the corresponding widget to respond according to the incoming path. If this is the case, then the program does not have to be initialized every time. Will this affect the efficiency? Also, if the database is read, the database will be rewritten every time, which will also affect the performance, right? I just learned php, thank you very much.

Reply content:

I know that typecho is a single entry. Every time you access the page, you access the content of the index, and call the corresponding widget to respond according to the incoming path. If this is the case, then the program does not have to be initialized every time. Will this affect the efficiency? Also, if the database is read, the database will be rewritten every time, which will also affect the performance, right? I just learned php, thank you very much.

The life cycle of PHP is like this.
A request, a process, initialize resources,
The request ends, the process ends, and the resources are released

Non-single-entry programs cannot escape these steps. However, non-single-entry programs can streamline some unnecessary initialization code according to needs, but the increased maintenance cost is also quite high.

If you want to be more efficient, you can only increase it through some other methods, such as caching the database or something.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template