php
PHP - stream_copy_to_stream 함수
int stream_copy_to_stream ( resource $source , resource $dest [, int $maxlength= -1 [, int $offset= 0 ]] )
(PHP 5)
maxlength 인자는 바이트 수로서 정의하지 않을 경우 모든 내용을 스트림에 복사합니다.
(PHP 5)
maxlength 인자는 바이트 수로서 정의하지 않을 경우 모든 내용을 스트림에 복사합니다.
<?php
$src = fopen('http://www.example.com', 'r');
$dest1 = fopen('first1k.txt', 'w');
$dest2 = fopen('remainder.txt', 'w');
echo stream_copy_to_stream($src, $dest1, 1024) . " bytes \n";
echo stream_copy_to_stream($src, $dest2) . " bytes \n";
?>
0 댓글