开发者

stream_context_create returns NULL

开发者 https://www.devze.com 2023-03-03 03:37 出处:网络
<?php var_dump(stream_context_create(array()));?> http://php.net/manual/en/function.stream-context-creat开发者_高级运维e.php
<?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());
0

精彩评论

暂无评论...
验证码 换一张
取 消