update : 2015.11.03
php.shukuma.com

검색:
 
 
Retrieve options for a stream/wrapper/context

stream_context_get_options

(PHP 4 >= 4.3.0, PHP 5)

stream_context_get_optionsRetrieve options for a stream/wrapper/context

설명

array stream_context_get_options ( resource $stream_or_context )

Returns an array of options on the specified stream or context.

인수

stream_or_context

The stream or context to get options from

반환값

Returns an associative array with the options.

예제

Example #1 stream_context_get_options() example

<?php
$params 
= array("method" => "POST");

stream_context_set_default(array("http" => $params));

var_dump(stream_context_get_options(stream_context_get_default()));

?>

위 예제의 출력 예시:

array(1) {
  ["http"]=>
  array(1) {
    ["method"]=>
    string(4) "POST"
  }
}