【发布时间】:2014-03-17 16:24:24
【问题描述】:
$newLogUrl = SERVER URL PATH
$opt = array('http' => array(
'method' => "POST",
'header' => 'Content-type: application/json',
'content' => $jsonCredenObj,
'timeout' => 4));
$context = stream_context_create($opt);
$response = file_get_contents($newLogUrl,false,$context);
上面的代码在普通的http中工作,但在安全服务器https中不工作
错误
Warning: file_get_contents(): failed to open stream: HTTP request failed! HTTP/1.1 405 Method Not Allowed
【问题讨论】:
-
你读错了吗?您不能在该网址上发帖。
标签: php arrays function http https