Category: Hprose for PHP 2.0
-
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: 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…