Year: 2025
-
Post Views: 29 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: 25 1. /page-editor/?pageid=1833011727099722 Open response 200. as shown in Figure 1 2. /page-editor/mobile?pageid=1833011727099722&type=mobile Now open the response 404 . as shown in Figure 2 3. Now there is only one index.html file under the directory backend\web\page-editor. Page-editor is implemented based on Vue. The existing Nginx configuration is as follows: 4. When nginx matches /page-editor/mobile, the /page-editor/ location will…
-
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: 23 1. Due to the front-end, the same page, for mobile devices and desktop devices, is a separate page. Therefore, you need to detect whether it is a mobile device in PHP 7.4, which in turn renders different template files 2. Reference:mobile-detect . Only the latest version of 3.* can be used, because PHP 7.4 is now used,…
-
Post Views: 32 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…
-
Post Views: 49 1. When the Alipay refund is implemented based on Riverslei/Payment, an error is reported: request get failed, msg[Invalid Arguments], sub_msg[验签出错,建议检查签名字符串或签名私钥与应用公钥是否匹配。如图1 #atfp_close_translate_span# 2. What you provide is an RSA private key in pkcs#1 (starting with miievq…, without the head and tail identification), you need to convert it to rsa in pkcs#8 format through the openssl command The private…