【发布时间】:2019-12-17 05:32:23
【问题描述】:
我无法解决此错误并向用户显示自定义消息, 我尝试将 web3js 与 laravel 一起使用 https://github.com/IlyasDeckers/web3php
当我尝试使用它时
$eth = new \IlyasDeckers\Web3PHP\Ethereum(env('WEB3_URL'), env('WEB3_PORT'));
try {
$eth = $eth->eth_getBalance('0x8fbb99e9e73cd62bb3adea5365ff0f9d90c9e532', $block='latest', $decode_hex=false);
}
catch(ConnectException $e) {
echo 'Message: ' .$e->getMessage();
exit;
}
我遇到了无法捕获的错误,有人可以帮忙吗?
GuzzleHttp\Exception\ConnectException cURL 错误 7: 失败 连接到 127.0.0.1 端口 8545:连接被拒绝(请参阅 http://curl.haxx.se/libcurl/c/libcurl-errors.html)
【问题讨论】: