$fp = fsockopen($url, 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: cloud.cs.st-andrews.ac.uk:8773\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}这段代码 报错如下:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=UTF-8 Failure: 500 Internal Server Error null对于http 500错误不是很了解请问原因是什么谢谢
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: cloud.cs.st-andrews.ac.uk:8773\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}这段代码 报错如下:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=UTF-8 Failure: 500 Internal Server Error null对于http 500错误不是很了解请问原因是什么谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货