When Yii framework increased the number of reading articles today, it found that the number of reading increased by 2 per visit
It turns out that whenever I render templates and layouts in the controller, the controller is executed twice.
Later, I found that as long as I set the layout to false or there is no HTML code in the layout, the controller will execute once, and if there is HTML code in a single layout, the controller will execute twice immediately. Once again, we found that the amount of reading on the top of the endpage increased by 1, once on the bottom of the endpage, the amount of reading will increase by 2
Please ask, does anyone encounter this problem, how to solve it, thank you