????$opts = array( ???????‘http‘=>array( ?????????‘method‘=>"POST", ?????????‘header‘ ?=> ‘Content-Length: 0‘ ??//这里不要写其他header ???????) ?????); ???????????$context = stream_context_create($opts); ?????$token_url = "https://ssssssss/cmtlists/gentoken"; ?????$post_id_str = file_get_contents($token_url, false, $context); ?????
HTTP request failed! HTTP/1.1 411 Length Required
原文地址:https://www.cnblogs.com/cbugs/p/9507705.html