mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-25 05:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78496 c90b9560-bf6c-de11-be94-00142212c4b1
78 lines
2.6 KiB
XML
78 lines
2.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
|
<refentry id="function.readfile">
|
|
<refnamediv>
|
|
<refname>readfile</refname>
|
|
<refpurpose>Outputs a file</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>readfile</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Reads a file and writes it to standard output.
|
|
</para>
|
|
<para>
|
|
Returns the number of bytes read from the file. If an error
|
|
occurs, &false; is returned and unless the function was called as
|
|
@readfile, an error message is printed.
|
|
</para>
|
|
<para>
|
|
If <parameter>filename</parameter> begins with "http://"
|
|
(not case sensitive), an HTTP 1.0 connection is opened to the
|
|
specified server and the text of the response is written to
|
|
standard output.
|
|
</para>
|
|
<para>
|
|
Versions prior to PHP 4.0.5 do not handle HTTP redirects. Because
|
|
of this, directories must include trailing slashes.
|
|
</para>
|
|
<para>
|
|
If <parameter>filename</parameter> begins with "ftp://"
|
|
(not case sensitive), an ftp connection to the specified server is
|
|
opened and the requested file is written to standard output. If the server
|
|
does not support passive mode ftp, this will fail.
|
|
</para>
|
|
<para>
|
|
If <parameter>filename</parameter> begins with neither
|
|
of these strings, the file will be opened from the filesystem and
|
|
its contents written to standard output.
|
|
</para>
|
|
<para>
|
|
You can use the optional second parameter and set it to "1", if
|
|
you want to search for the file in the <link
|
|
linkend="ini.include-path">include_path</link>, too.
|
|
</para>
|
|
<para>
|
|
See also <function>fpassthru</function>,
|
|
<function>file</function>, <function>fopen</function>,
|
|
<function>include</function>, <function>require</function>, and
|
|
<function>virtual</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|