Year: 2025
-
Post Views: 22 1. The PHP code is implemented as follows 2. When the response is a non-picture buffer, the data written in the picture file is incorrect. Image cannot be opened. The final decision is made to distinguish through the response header content-type. as shown in Figure 1 3. When the response is a non-picture buffer, yii\web\serverErrorHttpException: Failed to…
-
Post Views: 19 1. In LNMP 2.1, delete the default Default virtual host process. Looking at the directory, only .user.ini is left in /home/wwwroot/default, and other files have been manually deleted. as shown in Figure 1 2. Reference: lnmp add and delete virtual host and pseudo-static use tutorialhttps://lnmp.org/faq/lnmp-vhost-add-howto.html. But there is no default virtual host. as shown in Figure 2…
-
Post Views: 17 1. Prompt in phpstorm: potential polymorphic calls. There are no members in the hierarchy of requests. as shown in Figure 1 2. Print $this->request and confirm that it is yii\web\request object. as shown in Figure 2 3. This is because $this->request is not explicitly marked by the type, and phpstorm cannot confirm its class type (i.e. $this->request…
-
Post Views: 17 1. Report an error in Yii2: Model Not Inserted Due to Validation Error. as shown in Figure 1 2. The code is implemented as follows 3. However, !$input->save(false) does not report an error. Problem analysis, the value of value is 444 (integer), but the rule requires that value must be a string. You need to convert the…
-
Post Views: 53 1. When requesting the WeChat Mini Program interface: obtaining unrestricted applet code, an error is reported: errcode: 47001, errmsg: data format error Rid. as shown in Figure 1 2. Adjust the content-type of the request parameter and solve it. Then another error is reported: errcode: 41030, errmsg: invalid page Rid. as shown in Figure 2 3. Adjust…
-
Post Views: 16 1. The code is implemented as follows 2. But the verification failed, as shown in Figure 1 3. Since the format of H:I is the format in PHP. Set the string starting with php: to represent the date-time format that PHP can recognize. Verification passed. as shown in Figure 2
-
Post Views: 16 1. Request an HTTPS URL in curl, and the response is False’s troubleshooting analysis. var_dump($rst), whose value is false 2. Configure openssl.cafile in php.ini. False no longer responds after restarting php-fpm