错误代码
PHP Warning: fopen(http://...@127.0.0.1:8332/) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in D:\test\jsonRPCClient.php on line 132
PHP Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://user:password@127.0.0.1:8332/' in D:\test\jsonRPCClient.php:140
Stack trace:
#0 D:\test\test.php(8): jsonRPCClient->__call('getreceivedbyla...', Array)
#1 D:\test\test.php(8): jsonRPCClient->getreceivedbylabel('Your Address')
#2 {main}
thrown in D:\test\jsonRPCClient.php on line 140
我使用的是wiki提供的代码:
<?php
require_once 'jsonRPCClient.php';
$bitcoin = new jsonRPCClient('http://user:password@127.0.0.1:8332/');
echo "<pre>\n";
print_r($bitcoin->getinfo()); echo "\n";
echo "Received: ".$bitcoin->getreceivedbylabel("Your Address")."\n";
echo "</pre>";
?>
bitcoin启动代码
C:\Users\Administrator\AppData\Roaming\Bitcoin\bitcoin.conf
rpcuser=user
rpcpassword=password
rpcport=8332
server=1
请问问题出在哪里呢?