mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Function reverted to original behavior
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@124060 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c0ef306064
commit
a23f9b39a4
1 changed files with 3 additions and 26 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<refentry id="function.stream-copy-to-stream">
|
||||
<refnamediv>
|
||||
<refname>stream_copy_to_stream</refname>
|
||||
|
@ -9,20 +9,10 @@
|
|||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>stream_copy_to_stream</methodname>
|
||||
<methodparam><type>mixed</type><parameter>source</parameter></methodparam>
|
||||
<methodparam><type>mixed</type><parameter>dest</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>source</parameter></methodparam>
|
||||
<methodparam><type>resource</type><parameter>dest</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>maxlength</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
<parameter>source</parameter> and <parameter>dest</parameter> can each be
|
||||
either an active stream resource (opened with <function>fopen</function>,
|
||||
<function>fsockopen</function>, <function>stream_socket_connect</function>,
|
||||
<function>stream_socket_accept</function>, or another stream creation
|
||||
function), or a string pointing to a filename or valid wrapper resource.
|
||||
If <parameter>source</parameter> or <parameter>dest</parameter> are strings,
|
||||
<literal>PHP</literal> will attempt to open the stream from reading or
|
||||
writting as appropriate, perform the copy, then close it.
|
||||
</simpara>
|
||||
<para>
|
||||
Makes a copy of up to <parameter>maxlength</parameter> bytes
|
||||
of data from the current position in <parameter>source</parameter> to
|
||||
|
@ -41,19 +31,6 @@ $dest2 = fopen('remainder.txt','w');
|
|||
print stream_copy_to_stream($src, $dest1, 1024) . " bytes copied to first1k.txt\n";
|
||||
print stream_copy_to_stream($src, $dest2) . " bytes copied to remainder.txt\n";
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>Using <function>stream_copy_to_stream</function> on urls</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$src = 'http://www.example.com/path/to/file.txt';
|
||||
$dest = 'compress.zlib://file.txt';
|
||||
|
||||
print stream_copy_to_stream($src, $dest) . " bytes copied from webserver and written to compressed local file.\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue