# grpc_php_examples **Repository Path**: walter80/grpc_php_examples ## Basic Information - **Project Name**: grpc_php_examples - **Description**: grpc php教程 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-14 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gRPC PHP Quick Start Example 3415 cd grpc/src/php/ext/grpc 3416 phpize 3417 ./configure 3418 make 3419 sudo make install 3420 sudo mount -uw / 3421 sudo make install 3422 cd grpc 3423 ~/grpc 3424 make grpc_php_plugin 3425 cd examples/php 3426 ./greeter_proto_gen.sh 3427 composer install 3428 node greeter_server.js ~/grpc/examples/php  ➦ cb81fe0dfa ●  ./run_greeter_client.sh Hello world ~/grpc/examples/node/dynamic_codegen   master ●  node greeter_server.js 已存在的文件夹或 Git 仓库 cd existing_folder git init git remote add origin git@gitee.com:walter80/grpc_php_examples.git git add . git commit git push -u origin master ## Prerequisites This requires `php` >= 5.5, `pecl`, `composer` ## Install - Install the `grpc` extension ```sh $ [sudo] pecl install grpc ``` - Install the `protoc` compiler plugin `grpc_php_plugin` ```sh $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc $ cd grpc $ make grpc_php_plugin ``` - Install the `grpc/grpc` composer package ``` $ cd examples/php $ composer install ``` ## Try it! - Run the server Please follow the instruction in [Node][] to run the server ``` $ cd examples/node $ npm install $ cd dynamic_codegen or cd static_codegen $ node greeter_server.js ``` - Generate proto files and run the client ``` $ cd examples/php $ ./greeter_proto_gen.sh $ ./run_greeter_client.sh ``` ## In-depth Tutorial You can find a more detailed tutorial in [gRPC Basics: PHP][] [Node]:https://github.com/grpc/grpc/tree/master/examples/node [gRPC Basics: PHP]:https://grpc.io/docs/tutorials/basic/php.html