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