stream_context_set_option
(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
stream_context_set_option — 对资源流、数据包或者上下文设置参数
说明
stream_context_set_option(
resource
string
string
mixed
): bool
resource
$stream_or_context
,string
$wrapper
,string
$option
,mixed
$value
): bool
stream_context_set_option(resource
$stream_or_context
, array $options
): bool
给指定的上下文设置参数。参数 value
是设置 wrapper
的 option
参数的值。
参数
-
stream_or_context
-
需要添加参数的资源流或者上下文。
-
wrapper
-
封装协议的名称(可能与协议不同)。 请参考 上下文(Context)选项和参数 查看资源流参数列表。
-
option
-
选项的名称。
-
value
-
选项的值。
-
options
-
给
stream_or_context
设置的选项。注意:
options
必须是一个$arr['wrapper']['option'] = $value
格式二维关联数组 。请参考 上下文(Context)选项和参数 查看资源流参数列表。
返回值
成功时返回 true
, 或者在失败时返回 false
。

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/function.stream-context-set-option.php