我有以下代码:
$fh=fopen($api,"r");
$theData = fgets($fh);
echo $theData;
这会将错误抛出为:
Warning: fopen(http://xxxxxx.xxxxxxxx.com:8080) [function.fopen]: failed to open stream: Connection refused in /home/xxxx/public_html/xxxx/index.php on line 18
Warning: fgets(): supplied argument is not a valid stream resource in /home/xxxx/public_html/xxxx/index.php on line 19
解决方案是什么?