luoxiaojun1992 / yii2-tars-demo

4 stars 3 forks source link

示例代码src下tars/cservant #3

Closed zzjzzb closed 4 years ago

zzjzzb commented 5 years ago

代码中src/config/params.php文件和tars/example.tars tars/tars.proto.php文件里都没有找到要在/src/tars/cservant中生成代码,想确认一下,是不是这个示例没有刷了呀?还是我有什么漏掉了

luoxiaojun1992 commented 4 years ago
  1. 生成代码的路径是通过src/config/params.php中的tars.proto.dstPath字段配置,配置成你想要的目录即可。
  2. 生成的代码类型(服务端 or 客户端),是通过src/config/params.php中的tars.proto.withServant字段配置,true为服务端。
  3. 在scripts目录执行编译脚本生成接口代码/bin/bash tars2php.sh
luoxiaojun1992 commented 4 years ago

详细可参考代码注释:https://github.com/luoxiaojun1992/yii2-tars/blob/master/src/config/tars.php

luoxiaojun1992 commented 4 years ago

我将结束这个问题。如果您有任何问题,请随时重新讨论这个问题。

luoxiaojun1992 commented 4 years ago

I will close this issue. If you have any question else, please feel free to reopen this issue.