protobuf-php/protobuf

require_once(php.pb.php): failed to open stream: : No such file or directory

allentofight opened this issue · 1 comments

where I get the addressbook.pb.php successfully,I create a test.php in the same directory, like this

#!/usr/bin/env php
<?php

require_once('addressbook.pb.php');

$person = new Person();
$person->setName('test');

echo $person;

?>%

and where I use http://localhost/ProtoBuffer/src/test.php to visit the test.php,It reports the error like the title ,how to resolve it

where is the php.pb.php?

It looks like you either renamed you files or are using a different library..
protobuf-php/protobuf-plugin will generate one file for each protobuf component..

Please see protobuf-php/protobuf-plugin:README.md and protobuf-php/protobuf:README.md