Обновлённый PHP-Fusion Bogatyr / Free CMS PHP-Fusion 7 Bogatyr / Creating your php-pages and plug-ins for PHP Fusion 7 Bogatyr / Why is the php page created by me very slowly loading or loading up to the end?
English
If you use the php page in the standard PHP-Fusion-7 design, then you definitely have a line in the middle of the file:
require_once THEMES. "templates/header.php";
or
require_once THEMES. "templates/admin_header.php";
or
require_once THEMES. "templates/admin_header_mce.php";
And at the very end of the php page there is a line:
require_once THEMES. "templates/footer.php";
The files "header.php", "admin_header.php", "admin_header_mce.php" include panels "/themes/templates/panels.php" and a theme design file, for example, "/themes/Omni/theme.php". And also start outputting all echo to the buffer.
The file "/themes/templates/footer.php" ends the output to the buffer and displays the entire contents of the page.
Therefore, if you do not need a theme design or display of panels, it is enough to make the inclusion of only one "maincore.php" file, so that all of the built-in PHP-Fusion-7 core functions work:
require_once "maincore.php";
However, this is not all.
If you are not using a php page in a standard design, then you should add a line at the very end of the php page:
mysql_close();
Example: new "login.php" in Bogatyr.
Otherwise, the server does not close the call to the database. Calls accumulate and the server eventually slows down.
Hosting:
"Your tariff has a limit of 32 connections to the database.
You need to either optimize the operation of the scripts so that the number of connections is less, or try switching to a more expensive tariff, where the limit of connections is greater. "
This is written about unclosed bases. these are 32 page formations at the same time.
I thought that the page was generated and the database itself automatically closes. However, it automatically closes after the session, it is already tens of minutes. or maybe a watch.
in footer.php the database is closed with the line:
mysql_close(); |