Category: Web Application Development
-
Post Views: 26 1. The industry information page cache has not been updated in time. When a new article is added in the background, the list page of the front desk is not updated in time, and it always takes 5 minutes to update. I feel that the dependency of the page cache has not taken effect. The latest two…
-
Post Views: 33 1. — `Official-Website-Management-System`.recommendation_slots definition There are two tables for the existing recommendation bits and recommendation bit data. There is also an initialization script of the recommended bit, the code is implemented as follows: Implemented logic to add or update based on Alias, and Alias has a fixed correspondence with the ID. In the code, when hardcoded to…
-
Post Views: 30 1. The table structure is designed to allow alias to be null, and the default is null, and a unique index is added. 2. When the background form is submitted for editing, the empty string is automatically converted to null. Set conversion rules and validation in the Rules of the model 3. In the front-end view file,…
-
Post Views: 32 1. In Yii2, an error is reported: call to undefined method closure::EvaluateDependency(). as shown in Figure 1 2. Add a page cache to the details page corresponding to the View method. The code is implemented as follows 3. The current version of Yii2 is 2.0.50. Instead of directly passing the closure to dependency, it is a dependency…
-
Post Views: 27 1. In Yii2, how to implement the route of case/. If configuredcase/=>use-case/index, is invalid, open /case/ will redirect to /case. As shown in Figure 1 2. Adjust the configuration as follows,Suffix=>/ / *, the response is 200 , and /case is opened, and it will also automatically jump to /case/ in line with expectations. as shown in…
-
Post Views: 31 1. The code in the view is implemented as follows when the url ishttp://official.local/casetime, generated , the image address ishttp://official.local/static/images/header/top.png,响应200 when the url ishttp://official.local/case/time, generated , the image address ishttp://official.local/case/images/top.png, response 404. How to solve it? as shown in Figure 1 2. Viewhttp://official.local/case/page source code, generated , the image address ishttp://official.local/case/images/top.png, response 404. as shown in Figure…
-
Post Views: 33 1. Error when executing database migration in YII2: ExceptionYii\di\NotInstantableExceptionwith messageFailed to instantiate component or class “m220810_154914_create_table_access_tokens”.. as shown in Figure 1 2. This migration file is copied from other projects. The contents of the file are as follows 3. The specific reason has not been found for the time being, and it is decided to create a…
-
Post Views: 30 1. The existing implementation, an interface, is to obtain Alipay’s payment link in WeChat (requires login), and there is a callback interface (requires a signature), and a query interface (requires login). Now that payment online payment can only be made in the system browser, the query interface needs to be set to visitor accessible. In order to…