Join Up!
96807 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousfputsfscanfnext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | German

fread

(PHP 3, PHP 4 )

fread -- Lee ficheros en plan binario

Descripción

string fread ( int fp, int length)

fread() lee hasta length bytes del apuntador de fichero referenciado por fp. La lectura acaba cuando length bytes se han leido o se alcanza EOF, lo que ocurra primero.

// Mete el contenido de un fichero en una cadena
$filename = "/usr/local/something.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);

Ver también fwrite(), fopen(), fsockopen(), popen(), fgets(), fgetss(), file(), y fpassthru().

User Contributed Notes
fread
add a note about notes
There are no user contributed notes for this page.
previousfputsfscanfnext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST