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