stream_context_get_options
(PHP 4 >= 4.3.0, PHP 5, PHP 7)
stream_context_get_options - 检索流/包装器/上下文的选项
描述
array stream_context_get_options ( resource $stream_or_context )
返回指定流或上下文中的选项数组。
参数
stream_or_context
从中获取选项的流或上下文
返回值
用选项返回一个关联数组。
示例
示例#1 stream_context_get_options()示例
<?php
$params = array("method" => "POST");
stream_context_set_default(array("http" => $params));
var_dump(stream_context_get_options(stream_context_get_default()));
?>
上面的例子会输出类似于:
array(1) {
["http"]=>
array(1) {
["method"]=>
string(4) "POST"
}
}
← stream_context_get_default
stream_context_get_params →
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com