(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
stream_context_set_option — 對資源流、數(shù)據(jù)包或者上下文設置參數(shù)
$stream_or_context,$wrapper,$option,$value$stream_or_context, array $options): bool
給指定的上下文設置參數(shù)。參數(shù) value
是設置 wrapper 的 option 參數(shù)的值。
stream_or_context需要添加參數(shù)的資源流或者上下文。
wrapper封裝協(xié)議的名稱(可能與協(xié)議不同)。 請參考 上下文(Context)選項和參數(shù) 查看資源流參數(shù)列表。
option選項的名稱。
value選項的值。
options
給 stream_or_context 設置的選項。
注意:
options必須是一個$arr['wrapper']['option'] = $value格式二維關聯(lián)數(shù)組 。請參考 上下文(Context)選項和參數(shù) 查看資源流參數(shù)列表。
成功時返回 true, 或者在失敗時返回 false。