Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 3076

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>Filesystem functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Function Reference"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="filepro"
HREF="function.filepro.html"><LINK
REL="NEXT"
TITLE="basename"
HREF="function.basename.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.filepro.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.basename.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.filesystem"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>XXX. Filesystem functions</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN24856"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.intro"
></A
>Introduction</H1
><P
>&#13;    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.requirements"
></A
>Requirements</H1
><P
>No external libraries are needed to build this extension.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.installation"
></A
>Installation</H1
><P
>There is no installation needed to use these
functions; they are part of the PHP core.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.configuration"
></A
>Runtime Configuration</H1
><P
>&#13;The behaviour of these functions is affected by settings in <TT
CLASS="filename"
>php.ini</TT
>.
</P
><P
>&#13;  <DIV
CLASS="table"
><A
NAME="AEN24871"
></A
><P
><B
>Table 1. Filesystem and Streams Configuration Options</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Name</TH
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Default</TH
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Changeable</TH
></TR
></THEAD
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>allow_url_fopen</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>"1"</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>PHP_INI_ALL</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>user_agent</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>NULL</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>PHP_INI_ALL</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>default_socket_timeout</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>"60"</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>PHP_INI_ALL</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>from</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>NULL</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>??</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>auto_detect_line_endings</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>"Off"</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>PHP_INI_ALL</TD
></TR
></TBODY
></TABLE
></DIV
>
 </P
><P
>&#13;  Here is a short explanation of the configuration directives.
  <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><A
NAME="ini.allow-url-fopen"
></A
><TT
CLASS="parameter"
><I
>allow_url_fopen</I
></TT
>
     <A
HREF="language.types.boolean.html"
><B
CLASS="type"
>boolean</B
></A
></DT
><DD
><P
>&#13;      This option enables the URL-aware fopen wrappers that enable 
      accessing URL object like files. Default wrappers are provided for 
      the access of <A
HREF="features.remote-files.html"
>remote files</A
>
      using the ftp or http protocol, some extensions like
      <A
HREF="ref.zlib.html"
>zlib</A
> may register additional
      wrappers. 
     </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
       This option was introduced immediately after the release of version 
       4.0.3. For versions up to and including 4.0.3 you can only disable this 
       feature at compile time by using the configuration switch 
       <A
HREF="install.configure.html#install.configure.disable-url-fopen-wrapper"
><TT
CLASS="parameter"
><I
>&#13;       --disable-url-fopen-wrapper</I
></TT
></A
>.
      </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Warning</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
> 
       On Windows versions prior to PHP 4.3, the following functions do not
       support remote file accesing: <A
HREF="function.include.html"
><B
CLASS="function"
>include()</B
></A
>,
       <A
HREF="function.include-once.html"
><B
CLASS="function"
>include_once()</B
></A
>, <A
HREF="function.require.html"
><B
CLASS="function"
>require()</B
></A
>,
       <A
HREF="function.require-once.html"
><B
CLASS="function"
>require_once()</B
></A
> and the imagecreatefromXXX
       functions in the <A
HREF="ref.image.html"
>Reference XLI, <I
>Image functions</I
></A
> extension.
      </P
></TD
></TR
></TABLE
></DIV
></DD
><DT
><A
NAME="ini.user-agent"
></A
><TT
CLASS="parameter"
><I
>user_agent</I
></TT
>
     <A
HREF="language.types.string.html"
><B
CLASS="type"
>string</B
></A
></DT
><DD
><P
>&#13;      Define the user agent for <TT
CLASS="literal"
>PHP</TT
> to send.
     </P
></DD
><DT
><A
NAME="ini.default-socket-timeout"
></A
><TT
CLASS="parameter"
><I
>default_socket_timeout</I
></TT
>
     <A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
></DT
><DD
><P
>&#13;      Default timeout (in seconds) for socket based streams.
     </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
       This configuration option was introduced in PHP 4.3.
      </P
></BLOCKQUOTE
></DIV
></DD
><DT
><A
NAME="ini.from"
></A
><TT
CLASS="parameter"
><I
>from="joe@example.com"</I
></TT
>
     <A
HREF="language.types.string.html"
><B
CLASS="type"
>string</B
></A
></DT
><DD
><P
>&#13;      Define the anonymous ftp password (your email address).
     </P
></DD
><DT
><A
NAME="ini.auto-detect-line-endings"
></A
><TT
CLASS="parameter"
><I
>auto_detect_line_endings</I
></TT
>
     <A
HREF="language.types.boolean.html"
><B
CLASS="type"
>boolean</B
></A
></DT
><DD
><P
>&#13;      When turned on, PHP will examine the data read by
      <A
HREF="function.fgets.html"
><B
CLASS="function"
>fgets()</B
></A
> and <A
HREF="function.file.html"
><B
CLASS="function"
>file()</B
></A
> to see if it
      is using Unix, MS-Dos or Macintosh line-ending conventions.
     </P
><P
>This enables PHP to interoperate with Macintosh systems,
      but defaults to Off, as there is a very small performance penalty
      when detecting the EOL conventions for the first line, and also
      because people using carriage-returns as item separators under
      Unix systems would experience non-backwards-compatible behaviour.
     </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
       This configuration option was introduced in PHP 4.3.
      </P
></BLOCKQUOTE
></DIV
></DD
></DL
></DIV
>
 </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.resources"
></A
>Resource Types</H1
><P
>&#13;     </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.constants"
></A
>Predefined Constants</H1
><P
>This extension has no constants defined.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="filesystem.seealso"
></A
>See Also</H1
><P
>&#13;     For related functions, see also the <A
HREF="ref.dir.html"
>Directory</A
>
     and <A
HREF="ref.exec.html"
>Program Execution</A
> sections.
    </P
><P
>&#13;     For a list and explanation of the various URL wrappers that can be used
     as remote files, see also <A
HREF="wrappers.html"
>Appendix I</A
>.
    </P
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="function.basename.html"
>basename</A
>&nbsp;--&nbsp;Returns filename component of path</DT
><DT
><A
HREF="function.chgrp.html"
>chgrp</A
>&nbsp;--&nbsp;Changes file group</DT
><DT
><A
HREF="function.chmod.html"
>chmod</A
>&nbsp;--&nbsp;Changes file mode</DT
><DT
><A
HREF="function.chown.html"
>chown</A
>&nbsp;--&nbsp;Changes file owner</DT
><DT
><A
HREF="function.clearstatcache.html"
>clearstatcache</A
>&nbsp;--&nbsp;Clears file status cache</DT
><DT
><A
HREF="function.copy.html"
>copy</A
>&nbsp;--&nbsp;Copies file</DT
><DT
><A
HREF="function.delete.html"
>delete</A
>&nbsp;--&nbsp;See <A
HREF="function.unlink.html"
><B
CLASS="function"
>unlink()</B
></A
> or <A
HREF="function.unset.html"
><B
CLASS="function"
>unset()</B
></A
></DT
><DT
><A
HREF="function.dirname.html"
>dirname</A
>&nbsp;--&nbsp;Returns directory name component of path</DT
><DT
><A
HREF="function.disk-free-space.html"
>disk_free_space</A
>&nbsp;--&nbsp;Returns available space in directory</DT
><DT
><A
HREF="function.disk-total-space.html"
>disk_total_space</A
>&nbsp;--&nbsp;Returns the total size of a directory</DT
><DT
><A
HREF="function.diskfreespace.html"
>diskfreespace</A
>&nbsp;--&nbsp;Alias of <A
HREF="function.disk-free-space.html"
><B
CLASS="function"
>disk_free_space()</B
></A
></DT
><DT
><A
HREF="function.fclose.html"
>fclose</A
>&nbsp;--&nbsp;Closes an open file pointer</DT
><DT
><A
HREF="function.feof.html"
>feof</A
>&nbsp;--&nbsp;Tests for end-of-file on a file pointer</DT
><DT
><A
HREF="function.fflush.html"
>fflush</A
>&nbsp;--&nbsp;Flushes the output to a file</DT
><DT
><A
HREF="function.fgetc.html"
>fgetc</A
>&nbsp;--&nbsp;Gets character from file pointer</DT
><DT
><A
HREF="function.fgetcsv.html"
>fgetcsv</A
>&nbsp;--&nbsp;Gets line from file pointer and parse for CSV fields</DT
><DT
><A
HREF="function.fgets.html"
>fgets</A
>&nbsp;--&nbsp;Gets line from file pointer</DT
><DT
><A
HREF="function.fgetss.html"
>fgetss</A
>&nbsp;--&nbsp;Gets line from file pointer and strip HTML tags</DT
><DT
><A
HREF="function.file-exists.html"
>file_exists</A
>&nbsp;--&nbsp;Checks whether a file exists</DT
><DT
><A
HREF="function.file-get-contents.html"
>file_get_contents</A
>&nbsp;--&nbsp;Reads entire file into a string</DT
><DT
><A
HREF="function.file.html"
>file</A
>&nbsp;--&nbsp;Reads entire file into an array</DT
><DT
><A
HREF="function.fileatime.html"
>fileatime</A
>&nbsp;--&nbsp;Gets last access time of file</DT
><DT
><A
HREF="function.filectime.html"
>filectime</A
>&nbsp;--&nbsp;Gets inode change time of file</DT
><DT
><A
HREF="function.filegroup.html"
>filegroup</A
>&nbsp;--&nbsp;Gets file group</DT
><DT
><A
HREF="function.fileinode.html"
>fileinode</A
>&nbsp;--&nbsp;Gets file inode</DT
><DT
><A
HREF="function.filemtime.html"
>filemtime</A
>&nbsp;--&nbsp;Gets file modification time</DT
><DT
><A
HREF="function.fileowner.html"
>fileowner</A
>&nbsp;--&nbsp;Gets file owner</DT
><DT
><A
HREF="function.fileperms.html"
>fileperms</A
>&nbsp;--&nbsp;Gets file permissions</DT
><DT
><A
HREF="function.filesize.html"
>filesize</A
>&nbsp;--&nbsp;Gets file size</DT
><DT
><A
HREF="function.filetype.html"
>filetype</A
>&nbsp;--&nbsp;Gets file type</DT
><DT
><A
HREF="function.flock.html"
>flock</A
>&nbsp;--&nbsp;Portable advisory file locking</DT
><DT
><A
HREF="function.fnmatch.html"
>fnmatch</A
>&nbsp;--&nbsp;Match filename against a  pattern</DT
><DT
><A
HREF="function.fopen.html"
>fopen</A
>&nbsp;--&nbsp;Opens file or URL</DT
><DT
><A
HREF="function.fpassthru.html"
>fpassthru</A
>&nbsp;--&nbsp;Output all remaining data on a file pointer</DT
><DT
><A
HREF="function.fputs.html"
>fputs</A
>&nbsp;--&nbsp;Writes to a file pointer</DT
><DT
><A
HREF="function.fread.html"
>fread</A
>&nbsp;--&nbsp;Binary-safe file read</DT
><DT
><A
HREF="function.fscanf.html"
>fscanf</A
>&nbsp;--&nbsp;Parses input from a file according to a format</DT
><DT
><A
HREF="function.fseek.html"
>fseek</A
>&nbsp;--&nbsp;Seeks on a file pointer</DT
><DT
><A
HREF="function.fstat.html"
>fstat</A
>&nbsp;--&nbsp;Gets information about a file using an open file pointer</DT
><DT
><A
HREF="function.ftell.html"
>ftell</A
>&nbsp;--&nbsp;Tells file pointer read/write position</DT
><DT
><A
HREF="function.ftruncate.html"
>ftruncate</A
>&nbsp;--&nbsp;Truncates a file to a given length</DT
><DT
><A
HREF="function.fwrite.html"
>fwrite</A
>&nbsp;--&nbsp;Binary-safe file write</DT
><DT
><A
HREF="function.glob.html"
>glob</A
>&nbsp;--&nbsp;Find pathnames matching a pattern</DT
><DT
><A
HREF="function.is-dir.html"
>is_dir</A
>&nbsp;--&nbsp;Tells whether the filename is a directory</DT
><DT
><A
HREF="function.is-executable.html"
>is_executable</A
>&nbsp;--&nbsp;Tells whether the filename is executable</DT
><DT
><A
HREF="function.is-file.html"
>is_file</A
>&nbsp;--&nbsp;Tells whether the filename is a regular file</DT
><DT
><A
HREF="function.is-link.html"
>is_link</A
>&nbsp;--&nbsp;Tells whether the filename is a symbolic link</DT
><DT
><A
HREF="function.is-readable.html"
>is_readable</A
>&nbsp;--&nbsp;Tells whether the filename is readable</DT
><DT
><A
HREF="function.is-uploaded-file.html"
>is_uploaded_file</A
>&nbsp;--&nbsp;Tells whether the file was uploaded via HTTP POST</DT
><DT
><A
HREF="function.is-writable.html"
>is_writable</A
>&nbsp;--&nbsp;Tells whether the filename is writable</DT
><DT
><A
HREF="function.is-writeable.html"
>is_writeable</A
>&nbsp;--&nbsp;Tells whether the filename is writable</DT
><DT
><A
HREF="function.link.html"
>link</A
>&nbsp;--&nbsp;Create a hard link</DT
><DT
><A
HREF="function.linkinfo.html"
>linkinfo</A
>&nbsp;--&nbsp;Gets information about a link</DT
><DT
><A
HREF="function.lstat.html"
>lstat</A
>&nbsp;--&nbsp;Gives information about a file or symbolic link</DT
><DT
><A
HREF="function.mkdir.html"
>mkdir</A
>&nbsp;--&nbsp;Makes directory</DT
><DT
><A
HREF="function.move-uploaded-file.html"
>move_uploaded_file</A
>&nbsp;--&nbsp;Moves an uploaded file to a new location</DT
><DT
><A
HREF="function.parse-ini-file.html"
>parse_ini_file</A
>&nbsp;--&nbsp;Parse a configuration file</DT
><DT
><A
HREF="function.pathinfo.html"
>pathinfo</A
>&nbsp;--&nbsp;Returns information about a file path</DT
><DT
><A
HREF="function.pclose.html"
>pclose</A
>&nbsp;--&nbsp;Closes process file pointer</DT
><DT
><A
HREF="function.popen.html"
>popen</A
>&nbsp;--&nbsp;Opens process file pointer</DT
><DT
><A
HREF="function.readfile.html"
>readfile</A
>&nbsp;--&nbsp;Outputs a file</DT
><DT
><A
HREF="function.readlink.html"
>readlink</A
>&nbsp;--&nbsp;Returns the target of a symbolic link</DT
><DT
><A
HREF="function.realpath.html"
>realpath</A
>&nbsp;--&nbsp;Returns canonicalized absolute pathname</DT
><DT
><A
HREF="function.rename.html"
>rename</A
>&nbsp;--&nbsp;Renames a file</DT
><DT
><A
HREF="function.rewind.html"
>rewind</A
>&nbsp;--&nbsp;Rewind the position of a file pointer</DT
><DT
><A
HREF="function.rmdir.html"
>rmdir</A
>&nbsp;--&nbsp;Removes directory</DT
><DT
><A
HREF="function.set-file-buffer.html"
>set_file_buffer</A
>&nbsp;--&nbsp;Alias of <A
HREF="function.stream-set-write-buffer.html"
><B
CLASS="function"
>stream_set_write_buffer()</B
></A
></DT
><DT
><A
HREF="function.stat.html"
>stat</A
>&nbsp;--&nbsp;Gives information about a file</DT
><DT
><A
HREF="function.symlink.html"
>symlink</A
>&nbsp;--&nbsp;Creates a symbolic link</DT
><DT
><A
HREF="function.tempnam.html"
>tempnam</A
>&nbsp;--&nbsp;Create file with unique file name</DT
><DT
><A
HREF="function.tmpfile.html"
>tmpfile</A
>&nbsp;--&nbsp;Creates a temporary file</DT
><DT
><A
HREF="function.touch.html"
>touch</A
>&nbsp;--&nbsp;Sets access and modification time of file</DT
><DT
><A
HREF="function.umask.html"
>umask</A
>&nbsp;--&nbsp;Changes the current umask</DT
><DT
><A
HREF="function.unlink.html"
>unlink</A
>&nbsp;--&nbsp;Deletes a file</DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.filepro.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.basename.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>filepro</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>basename</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>