Typecho is a single entry. I know that every time a page is accessed, it is the index content, and the corresponding widget is called to respond according to the input path. In this case, the program does not need to be initialized every time. does this affect the efficiency, and if it is to read data... typecho is a single entry. I know that every time a page is accessed, it is the index content, and the corresponding widget is called to respond according to the input path. In this case, the program does not need to be initialized every time, which affects the efficiency. In addition, if it is to read the database, the database will be overwritten every time, will it also affect performance? I just learned php. thank you very much.
Reply content:
Typecho is a single entry. I know that every time a page is accessed, it is the index content, and the corresponding widget is called to respond according to the input path. In this case, the program does not need to be initialized every time, which affects the efficiency. In addition, if it is to read the database, the database will be overwritten every time, will it also affect performance? I just learned php. thank you very much.
The lifecycle of PHP is like this.
A request, a process, initializing resources,
Request ended, process ended, resource released
Non-single-entry programs cannot escape these steps. they can simplify unnecessary initialization code as needed, but the added maintenance cost is also high.
To be more efficient, you can only increase it in some other ways, such as caching the database.