我尝试以下代码在任何函数中运行我的 cron 但它不起作用
$url = "http://example.com";
$header = array(
"Content-type" => "application/json",
"x-user-agent"=> "shkasdksajd"
);
$context_options = array(
'http' => array(
'method' => 'POST'
, 'header' => $header
)
);
$context = stream_context_create($context_options);
$page = file_get_contents($url, false, $context);
echo $page;
它显示内部服务器错误,但它在邮递员上运行
PIPIONE
慕工程0101907