PHP-文件获取内容无法从URL打开流
我有一段代码,它允许我从链接中检索信息。。。现在,它说无法打开流。。。代码如下: 谢谢PHP-文件获取内容无法从URL打开流,php,Php,我有一段代码,它允许我从链接中检索信息。。。现在,它说无法打开流。。。代码如下: 谢谢 $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_content
$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.""');
}
有关详细信息,请阅读文档 这个例子说
$homepage = file_get_contents('http://www.example.com/');
echo $homepage;
您正在使用
$homepage = file_get_contents('href="http://www.example.com/');
现在有什么问题吗?这是:
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);
您不需要连接空字符串。@SteveRobbins谢谢您的编辑我刚刚删除了不必要的开头和结尾我没有查找空字符串