stream_context_set_option()
(PHP 4 >= 4.3.0, PHP 5, PHP 7)
对资源流、数据包或者上下文设置参数
说明
stream_context_set_option(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
需要添加参数的资源流或者上下文。
- $options
添加给默认的上下文的参数。
Note:
$options必须是一个$arr['wrapper']['option']=$value格式二维关联数组。
请参考context options and parameters查看资源流参数列表。
返回值
成功时返回TRUE
,或者在失败时返回FALSE
。