<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.streamwrapper.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'streamwrapper.stream-open.php',
    1 => 'streamWrapper::stream_open',
    2 => 'Opens file or URL',
  ),
  'up' => 
  array (
    0 => 'class.streamwrapper.php',
    1 => 'streamWrapper',
  ),
  'prev' => 
  array (
    0 => 'streamwrapper.stream-metadata.php',
    1 => 'streamWrapper::stream_metadata',
  ),
  'next' => 
  array (
    0 => 'streamwrapper.stream-read.php',
    1 => 'streamWrapper::stream_read',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stream/streamwrapper/stream-open.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="streamwrapper.stream-open" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">streamWrapper::stream_open</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.2, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">streamWrapper::stream_open</span> &mdash; <span class="dc-title">Opens file or URL</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-streamwrapper.stream-open-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>streamWrapper::stream_open</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$path</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$mode</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$options</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter reference">&$opened_path</code></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   This method is called immediately after the wrapper is initialized (f.e. by
   <span class="function"><a href="function.fopen.php" class="function">fopen()</a></span> and <span class="function"><a href="function.file-get-contents.php" class="function">file_get_contents()</a></span>).
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-streamwrapper.stream-open-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">path</code></dt>
     <dd>
      <p class="para">
       Specifies the URL that was passed to the original function.
      </p>
      <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
       <p class="para">
        The URL can be broken apart with <span class="function"><a href="function.parse-url.php" class="function">parse_url()</a></span>.  Note that only URLs
        delimited by :// are supported. : and :/ while technically valid URLs, are not.
       </p>
      </p></blockquote>
     </dd>
    
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       The mode used to open the file, as detailed for <span class="function"><a href="function.fopen.php" class="function">fopen()</a></span>.
      </p>
      <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
       <p class="para">
        Remember to check if the <code class="parameter">mode</code> is valid for the
        <code class="parameter">path</code> requested.
       </p>
      </p></blockquote>
     </dd>
    
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       Holds additional flags set by the streams API. It can hold one or more
       of the following values OR&#039;d together.
       <table class="doctable informaltable">
        
         <thead>
          <tr>
           <th>Flag</th>
           <th>Description</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td><strong><code><a href="stream.constants.php#constant.stream-use-path">STREAM_USE_PATH</a></code></strong></td>
           <td>If <code class="parameter">path</code> is relative, search
            for the resource using the include_path.
           </td>
          </tr>

          <tr>
           <td><strong><code><a href="stream.constants.php#constant.stream-report-errors">STREAM_REPORT_ERRORS</a></code></strong></td>
           <td>If this flag is set, you are responsible for raising
            errors using <span class="function"><a href="function.trigger-error.php" class="function">trigger_error()</a></span> during
            opening of the stream.  If this flag is not set, you
            should not raise any errors.
           </td>
          </tr>

         </tbody>
        
       </table>

      </p>
     </dd>
    
    
     <dt><code class="parameter">opened_path</code></dt>
     <dd>
      <p class="para">
       If the <code class="parameter">path</code> is opened successfully,
       and <strong><code><a href="stream.constants.php#constant.stream-use-path">STREAM_USE_PATH</a></code></strong> is set in <code class="parameter">options</code>,
       <code class="parameter">opened_path</code> should be set to the full
       path of the file/resource that was actually opened.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-streamwrapper.stream-open-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-streamwrapper.stream-open-errors">
  <h3 class="title">Помилки/виключення</h3>
  <p class="para">Виводить
<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>, якщо цей метод не вдалося викликати (напр. не
реалізований).</p>
 </div>

 



 <div class="refsect1 notes" id="refsect1-streamwrapper.stream-open-notes">
  <h3 class="title">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: <p class="para">Властивість
<var class="varname">streamWrapper::$context</var>
оновиться, якщо передано правильний контекст до функції виклику.</p></p></blockquote>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-streamwrapper.stream-open-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.fopen.php" class="function" rel="rdfs-seeAlso">fopen()</a> - Opens file or URL</span></li>
    <li><span class="function"><a href="function.parse-url.php" class="function" rel="rdfs-seeAlso">parse_url()</a> - Parse a URL and return its components</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>