Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 12650

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Accessing local filesystem</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wrappers.http.html">http://</a></div>
 <div class="up"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="wrappers.file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">file://</h1>
  <p class="refpurpose"><span class="refname">file://</span> &mdash; <span class="dc-title">Accessing local filesystem</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-wrappers.file-description">
  <h3 class="title">Description</h3>
  <p class="para">
   <em class="emphasis">Filesystem</em> is the default wrapper used with PHP and represents the local filesystem.
   When a relative path is specified (a path which does not begin with /, \, \\, or a Windows drive letter)
   the path provided will be applied against the current working directory.  In many cases this is the
   directory in which the script resides unless it has been changed.  Using the CLI sapi, this defaults
   to the directory from which the script was called.
  </p>
  <p class="simpara">
   With some functions, such as  <span class="function"><a href="function.fopen.html" class="function">fopen()</a></span> and  <span class="function"><a href="function.file-get-contents.html" class="function">file_get_contents()</a></span>,
   <em>include_path</em> may be optionally searched for relative paths as well.
  </p>
 </div>


 <div class="refsect1 usage" id="refsect1-wrappers.file-usage"> 
  <h3 class="title">Usage</h3>
  <ul class="itemizedlist">
   <li class="listitem"><span class="simpara"><var class="filename">/path/to/file.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">relative/path/to/file.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">fileInCwd.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">C:/path/to/winfile.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">C:\path\to\winfile.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">\\smbserver\share\path\to\winfile.ext</var></span></li>
   <li class="listitem"><span class="simpara"><var class="filename">file:///path/to/file.ext</var></span></li>
  </ul>
 </div>
 

 <div class="refsect1 options" id="refsect1-wrappers.file-options">
  <h3 class="title">Options</h3>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Wrapper Summary</strong></caption>
    
     <thead>
      <tr>
       <th>Attribute</th>
       <th>Supported</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>Restricted by <a href="filesystem.configuration.html#ini.allow-url-fopen" class="link">allow_url_fopen</a></td>
       <td>No</td>
      </tr>

      <tr>
       <td>Allows Reading</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Writing</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Appending</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Allows Simultaneous Reading and Writing</td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.stat.html" class="function">stat()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.unlink.html" class="function">unlink()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.rename.html" class="function">rename()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.mkdir.html" class="function">mkdir()</a></span></td>
       <td>Yes</td>
      </tr>

      <tr>
       <td>Supports  <span class="function"><a href="function.rmdir.html" class="function">rmdir()</a></span></td>
       <td>Yes</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>
 

 <div class="refsect1 changelog" id="refsect1-wrappers.file-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.0.0</td>
       <td>
        Added <em>file://</em>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="wrappers.http.html">http://</a></div>
 <div class="up"><a href="wrappers.html">Supported Protocols and Wrappers</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>