<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.stream.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'stream.contexts.php',
    1 => 'Stream Contexts',
    2 => 'Stream Contexts',
  ),
  'up' => 
  array (
    0 => 'book.stream.php',
    1 => 'Streams',
  ),
  'prev' => 
  array (
    0 => 'stream.filters.php',
    1 => 'Stream Filters',
  ),
  'next' => 
  array (
    0 => 'stream.errors.php',
    1 => 'Stream Errors',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/contexts.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="stream.contexts" class="chapter">
 <h1 class="title">Stream Contexts</h1>

 <p class="simpara">
  A <code class="literal">context</code> is a set of <code class="literal">parameters</code> and 
  wrapper specific <code class="literal">options</code> which modify or enhance the
  behavior of a stream.  <code class="literal">Contexts</code> are created using
  <span class="function"><a href="function.stream-context-create.php" class="function">stream_context_create()</a></span> and can be passed to most
  filesystem related stream creation functions (i.e. <span class="function"><a href="function.fopen.php" class="function">fopen()</a></span>,
  <span class="function"><a href="function.file.php" class="function">file()</a></span>, <span class="function"><a href="function.file-get-contents.php" class="function">file_get_contents()</a></span>, etc...).
 </p>
 <p class="simpara">
  <code class="literal">Options</code> can be specified when calling 
  <span class="function"><a href="function.stream-context-create.php" class="function">stream_context_create()</a></span>, or later using
  <span class="function"><a href="function.stream-context-set-option.php" class="function">stream_context_set_option()</a></span>.
  A list of wrapper specific <code class="literal">options</code> can be found in the
  <a href="context.php" class="xref">Context options and parameters</a> chapter.
 </p>
 <p class="simpara">
  <code class="literal">Parameters</code> can be specified for
  <code class="literal">contexts</code> using the
  <span class="function"><a href="function.stream-context-set-params.php" class="function">stream_context_set_params()</a></span> function.
 </p>
</div>
<?php manual_footer($setup); ?>