Category: Network Toolkit
-
Post Views: 15 1. Navigate to the directory where you want to create the application (e:\wwwroot\shopify-app). Your application will be created in a new subdirectory. as shown in Figure 1 2. Run one of the following commands to create a new application, and then select the language of the application template you want to start using: Node, PHP, or Ruby.…
-
Post Views: 14 1. Under api.pcs-stat.localhost, a standard RESTful API. The code in the method file is as follows (written by a colleague). as shown in Figure 1 2. Now plan to migrate this interface to api.pcs-api.localhost, at this time, api.pcs-api.localhost is an RPC client, api.pcs-stat.localhost is RPC server. Reference:https://www.shuijingwanwq.com/en/2020/06/23/11545/. 3. Create a new RPC server file, RPC/Controllers/DataPlanControlTaskController.php 4. Create…
-
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: 49 1. An error is reported in Yii 2.0: yii\base\ErrorException: undefined index: http_accept, as shown in Figure 1 2. Check the runtime log file: /api/runtime/logs/app.log 3. The log information of the two requests, found when $_SERVER[‘HTTP_USER_AGENT’]When the value is okhttp/3.12.0, $_server[‘HTTP_ACCEPT’]Does not exist 4. Ask the Android client to explicitly declare accept in headers when $_server[‘HTTP_USER_AGENT’]When the value…
-
Post Views: 29 1. Implement the corresponding RESTful-style web service API of the page in the API directory, and then adjust it to the RPC client 2. After all the corresponding APIs of the page are implemented, the POST request is executed in Postman, and the response is normal, as shown in Figure 1 3. Execute the PUT /pages/1 request…
-
Post Views: 44 1. In the local environment, post in postman , http://api.aims-api.localhost/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , the response is successful 2. In development environment, post in postman , http://wjdev2.chinamcloud.com:8659/v1/tasks?group_id=015ce30b116ce86058fa6ab4fea4ac63 , the response failed, as shown in Figure 2 3. Edit the Dockerfile of the interface (RPC client), and delete the passthru in disable_functions 4. Edit the Dockerfile of the RPC server and…
-
Post Views: 16 1. The basic implementation of RPC based on HPROSE for PHP 1.5.6 and Yii2.0.7, please refer to the website:https://www.shuijingwanwq.com/2016/03/24/953/ 2. Upgrade yii2 through composer and execute the command:composer update, as shown in Figure 1: 3. Open the URL:http://trade.service.ygt.cm/area/get-area-mobile, the error is reported, as shown in Figure 2: PHP warning – Yii\Base\ErrorException include(e:\wwwroot\service.ygt.cm\vendor\hprose\hprose\src\hprose\yii\server.php): Failed to open Stream: No…
-
Post Views: 13 1. Composer has been installed, update composer to the latest version, execute the command, the result is as shown in Figure 1: composer self-update Error: warning: modulembstringAlready loaded in unknown on line 0 2. In php.ini, it is found that extension=php_mbstring.dll is loaded twice, and the 1007 line is commented out, as shown in Figure 2 and…