Join Up!
104886 members and counting!

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

fread

(PHP 3, PHP 4 )

fread -- Binárně bezpečné čtení ze souboru

Popis

string fread ( int fp, int length)

fread() přečte nejvýše length bytů ze souboru specifikovaného deskriptorem fp. Čtení končí, pokud je přečteno length bytů nebo je dosažen konec souboru (podle toho, co přijde dřív).

// nacte obsah souboru do retezce
$filename = "/usr/local/something.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);

Viz také fwrite(), fopen(), fsockopen(), popen(), fgets(), fgetss(), fscanf(), file(), a fpassthru().

User Contributed Notes
fread
add a note about notes
There are no user contributed notes for this page.
previousfputsfscanfnext
Last updated: Sun, 27 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