To know the number of accesses to the database by your site on WordPress, you need to file the theme footer. php before the tag add the following code. <!–?php echo get_num_queries(); ?–> queries in <!–?php timer_stop(1); ?–> You will…
PHP page generation speed
To measure the speed of page generation in PHP, insert the following code at the beginning of the script: // Breathing start time of page generation $start_array = explode(” “,microtime());$start_time = $start_array[1] + $start_array[0]; And at the end of the…
Install Nginx, PHP, MySQL (Mariadb) on Ubuntu
-Would you be kind to me in which direction to go? -In the famous you, – replied the cat. -I don’t know it. -So, in the unknown. In any case, it is known that in a known time you will…
How to configure SSH without a password with a key pair in Ubuntu
Create a key pair, leave all values by default: ssh-keygen In the console, enter a command that configures the server so that you can sign in with an SSH key: ssh-copy-id -i .ssh/id_rsa.pub root@127.0.0.1 Instead of127.0.0.1, specify the IP server.…
Intercept require output in PHP or execute PHP in file_get_contents
… So we’re introducing a plan-intercept. Only immediately prepare a report that the plan-interception no results. The Lord of the Rings: the Two Towers In order to load the contents of a file and display it in a certain place…
Universal string comparison in JavaScript
If it’s more important than that between the lines, put the lines away. String comparison in JavaScript if(“text string”==”text string”) will not return true because In fact, not the strings are compared, but the addresses of those strings in memory. To…