stream_context_create returns NULL
<?php var_dump(stream_context_create(array()));?>
http://php.net/manual/en/function.stream-context-creat开发者_高级运维e.php
sez Return Values: A stream context resource. the return value should not be NULL but it is, there are no functions disable via php<?php var_dump( ini_get('disabled_functions'));?>
returns a blank string
what else could it be?
You do need to specify what KIND of stream you want to establish. You don't walk into a store and say "give me something!", you have to say "give me an apple" or "give me a steak". Passing in a blank array is basically the exact same thing.
this is a bug for typecast, try this:
echo var_export(''.stream_context_create());
精彩评论