Category: PHP 7.4
-
Post Views: 17 1. Error: call to undefined function international\image\gd\imagecreateFromJPEG(). as shown in Figure 1 2. Check phpinfo and find that the gd library does not support jpeg format. as shown in Figure 2 3. By upgrading the basic image of the container, check phpinfo, and add the value of jpeg support to Enabled. The GD library already supports the…
-
Post Views: 13 1. In Yii 2.0, the realization of health check, a colleague implemented a version before, I feel that it is necessary to adjust it again 2. The analysis code found that yii::$app->db->getisActive() is unnecessary. View the source code of the corresponding method separately. The related implementation of $this->pdo in getIsActive() already exists in open() . 3. Analyze…
-
Post Views: 17 1. In phpstorm prompt: Invalid vcs root mapping. The directory <project>\vendor\wartron\yii2-uuid is registered as a git root, but no git repositories were found there. as shown in Figure 1 2. Click Configure to enter the configuration interface. Discover: Vendor\Wartron\Yii2-UUID is marked red. as shown in Figure 2 3. Reference URL:https://www.shuijingwanwq.com/2020/05/11/4130/. The reason is that the directory is…
-
Post Views: 15 1. Based on the function: file_put_contents, when a string is written to the file, there are various forms in the group when defining the file name to be written to 2. Under different forms, the problem is that with the change of the running environment of the program, the file name of the written data is also…
-
Post Views: 37 1. Implement the corresponding RPC service of the page in the RPC directory, create a remote procedure call HTTP server, and create a new \RPC\Controllers\ServerController.php 2. Create a new page model \rpc\models\page.php 3. Create a new page controller, \rpc\controllers\pagecontroller.php 4. Then open the URL on the browser side:http://rpc.github-shuijingwan-yii2-app-advanced.localhost/page/create, see the following output: Fa2{u#s11″page_create”}z, as expected 5. Create…
-
Post Views: 15 1. In postman postman :http://api.pcs-api.localhost/v1/mobile/rtcs/invite-accept, the data in the body is written in the redis cache in the format of an array, as shown in Figure 1 The data in the body will change every time the request is requested, and the implementation logic in the program is as follows: 3. Check the difference set of the…
-
Post Views: 15 1. Error in CentOS 7.5 64-bit, PHP 7.4: PHP core warningYii\Base\ErrorExceptionwith messagemodulezipalready loaded, as shown in Figure 1 2. Check the information of phpinfo() and confirm that the zip extension is installed. as shown in Figure 2 3. Check whether zip exists in /usr/local/php/etc/php.ini. exists. 4. Check the extension_dir of phpinfo(), its value: /usr/local/php/lib/php/extensions/no-debug-non-zts-20190902/ , as shown…
-
Post Views: 14 1. In the domain name:http://editorweb.wjdev.chinamcloud.cnInterface in request:http://api.pcs.wjdev.chinamcloud.cn/v1/plan-tasks/274?login_id=2e368664c41b8bf511bcc9c65d86dbc3&login_tid=b26398238620e8cd15b0155cd7aee9b2, in response to 404 , the “Access-Control-Allow-Origin” header does not exist on the requested resource. as shown in Figure 1 Decide to implement a front-end AJAX request example in the local environment by yourself 3, POST request, response 200, but no response data. as shown in Figure 2 4. Refer…