PHP文件获取内容无法从URL打开流


PHP - file get content failed to open stream from URL

我有一段代码,它允许我从链接中检索信息。。。现在,它说未能打开流。。。这是代码:

谢谢!

$b = time ();
$date1 =date( "Y-m-d;h:i:s" , mktime(date("h")+6, date("i"), date("s"), date("m") , date("d"), date("Y")));
$str_time = "";
$str_msg = "";
$str_from = "";
$str_zip = "";
echo file_get_contents('href="http://testext.i-movo.com/api/receivesms.aspx?".$str_from."".$str_zip."".$phone."".$str_time."".$date1."".$str_msg.""');
}

这:

echo file_get_contents('href="http://testext.i-movo.com/api/receivesms.aspx?".$str_from."".$str_zip."".$phone."".$str_time."".$date1."".$str_msg.""');

应该是这样的:

echo file_get_contents("http://testext.i-movo.com/api/receivesms.aspx?".$str_from.$str_zip.$phone.$str_time.$date1.$str_msg);

请阅读file_get_contents 的文档

这个例子说

$homepage = file_get_contents('http://www.example.com/');
echo $homepage;

您正在使用

$homepage = file_get_contents('href="http://www.example.com/');

现在怎么了。。