Home
Sign Up
Sign In
V2EX
›
PHP
有没有使用过 drslump/Protobuf- PHP 的,求大神指教。
hehewf
·
Mar 6, 2017
· 3973 views
This topic created in 3543 days ago, the information mentioned may be changed or developed.
已生成 proto 对应的 php 文件,调用方法 serializeToString 没有反应,报错也没有。
Supplement 1 ·
Mar 15, 2017
已经解决。使用 allegro/php-protobuf 的 serializeToString 方法。(需求是: php 与 C++的 socket 通讯——内容体使用 protobuf 存储。)自己整理一下文章,比较杂乱,用需要的可以看一眼,提提建议。
http://www.diyisite.com/index.php/Home/Article/index/id/88.html
PHP
drslump
protobuf-
proto
4 replies
•
2017-03-15 09:11:02 +08:00
crystom
Mar 6, 2017
1
1
只有 serialize 方法
hehewf
OP
Mar 12, 2017
2
@
crystom
已经解决了。 php 开启了 protobuf 的拓展以后,就有了 serializeToString 这个方法。 protobuf 一开始没有搞好。现在可以了。
crystom
Mar 15, 2017
1
3
@
hehewf
你用 allegro/php-protobuf 的话确实是 serializeToString 方法,不过用 drslump/Protobuf- PHP 或者其 fork 版本的话,是 serialize 方法
hehewf
OP
Mar 15, 2017
4
@
crystom
嗯嗯。已经解决。用的是 allegro/php-protobuf 的 serializeToString 方法。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4880 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 48ms ·
UTC 03:16
·
PVG 11:16
·
LAX 19:16
·
JFK 22:16
♥ Do have faith in what you're doing.
❯