Code: Select all
$options = [
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded\r\n"
. 'Content-Length: ' . strlen($content),
'content' => $content,
'timeout' => 30,
],
];
$context = stream_context_create($options);
$stream = fopen($url, 'r', false, $context);
$read[] = $stream;
$write = null;
$except = null;
$streamsChanged = stream_select($read, $write, $except, 0, 50000);
Code: Select all
Type: ValueError
Message: No stream arrays were passed
Ein var_dump von $stream gibt „resource(stream) zurück, sodass der Typ korrekt zu sein scheint. Ich habe auch Folgendes ausgeführt:
Code: Select all
is_resource($stream)
&& get_resource_type($stream) === 'stream'
&& !feof($stream)
Mobile version