且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在页面加载时插入查询,是否插入两次?

更新时间:2023-02-05 19:17:31

前端控制器的逻辑错误.

无论对站点是正确的请求还是对不存在的资源的调用,都会在对站点的每个请求上调用执行该查询的页面.

The page where you are executing this query is called on every request made to your site, no matter whether it's a proper request or a call to a non-existent resource.

您必须更改前端控制器的逻辑,以便它不会针对无效请求运行应用程序.否则,该网站上线时不会出现千篇一律的错误插入.

You must change the logic of the front controller so it wouldn't run the application for the invalid requests. Otherwise there will be not one but thousands false inserts when the site goes live.