【发布时间】:2018-04-01 13:22:48
【问题描述】:
我正在使用区块链 API 为每个钱包生成一个新地址。
代码如下:
<?php
$guid = "7c74bb77-4e25-4eea-a9d3-df1cf6a9d218";
$main_password = "******";
$label = "firsttym";
$json_url = "http://localhost:3000/merchant/$guid/new_address?
password = $main_password & label = $label";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data ,true);
$message = $json_feed->message;
$txid = $json_feed->tx_hash;
?>
它总是返回这个警告:
警告:file_get_contents(localhost:3000/merchant/7c74bb77-4e25-4eea-a9d3-df1cf6a9d218/…) [function.file-get-contents]:无法打开流:
连接尝试失败,因为连接方在一段时间后没有正确响应,或者连接失败,因为连接的主机没有响应。在第 8 行的 C:\wamp\www\block\first.php 中
致命错误:C:\wamp\www\block\first.php 第 8 行的最大执行时间超过 30 秒
【问题讨论】:
-
它总是返回:警告:file_get_contents(localhost:3000/merchant/7c74bb77-4e25-4eea-a9d3-df1cf6a9d218/…) [function.file-get-contents]:未能打开流:连接尝试失败,因为连接方在一段时间,或建立连接失败,因为连接的主机没有响应。在第 8 行的 C:\wamp\www\block\first.php 中致命错误:在第 8 行的 C:\wamp\www\block\first.php 中超过了 30 秒的最大执行时间
-
提交了对问题的编辑后,我可以看到问题中有几个语法错误...在我的编辑被批准后(如果您愿意,您可以这样做),请确保这些错误不在您的实际代码中,然后编辑此答案以修复它们。
标签: php blockchain