Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错 找不到这个类 Hprose\BytesIO #141

Open
2102237144 opened this issue Jul 8, 2020 · 3 comments
Open

报错 找不到这个类 Hprose\BytesIO #141

2102237144 opened this issue Jul 8, 2020 · 3 comments

Comments

@2102237144
Copy link

PHP Fatal error: Uncaught Error: Class 'Hprose\BytesIO' not found in /www/hprose-php/src/Hprose/RPC/Core/DefaultServiceCodec.php:31

代码

addCallable("hello", "hello"); $server = new HttpServer(); $service->bind($server); $server->listen(); ~
@2102237144
Copy link
Author

PHP Fatal error: Uncaught Error: Class 'Hprose\BytesIO' not found in /www/hprose-php/src/Hprose/RPC/Core/DefaultServiceCodec.php:31

代码

include '/www/hprose-php/src/Hprose.php';

use Hprose\RPC\Http\HttpServer;
use Hprose\RPC\Service;

function hello(string $name): string {
return "Hello " . $name . "!";
}

$service = new Service();
$service->addCallable("hello", "hello");
$server = new HttpServer();
$service->bind($server);
$server->listen();
~

@andot
Copy link
Member

andot commented Jul 8, 2020

需要安装 hprose 的 pecl 扩展。

@2102237144
Copy link
Author

需要安装 hprose 的 pecl 扩展。

好的,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants