★ wanayoo — archive 1999 http://fr.php.net/manual/it/function.fread.phpNouvelle recherche | Portail wanayoo
PHP Tuesday, March 20, 2001  
downloads | documentation | faq | support | reporting bugs | links 

search for in the  

lookup:
Manuale PHPManuale PHP
FilesystemFilesystem
 basenamebasename
 chgrpchgrp
 chmodchmod
 chownchown
 clearstatcacheclearstatcache
 copycopy
 deletedelete
 dirnamedirname
 diskfreespacediskfreespace
 fclosefclose
 feoffeof
 fflushfflush
 fgetcfgetc
 fgetcsvfgetcsv
 fgetsfgets
 fgetssfgetss
 filefile
 file_existsfile_exists
 fileatimefileatime
 filectimefilectime
 filegroupfilegroup
 fileinodefileinode
 filemtimefilemtime
 fileownerfileowner
 filepermsfileperms
 filesizefilesize
 filetypefiletype
 flockflock
 fopenfopen
 fpassthrufpassthru
 fputsfputs
 freadfread
 fscanffscanf
 fseekfseek
 fstatfstat
 ftellftell
 ftruncateftruncate
 fwritefwrite
 set_file_bufferset_file_buffer
 is_diris_dir
 is_executableis_executable
 is_fileis_file
 is_linkis_link
 is_readableis_readable
 is_writeableis_writeable
 is_uploaded_fileis_uploaded_file
 linklink
 linkinfolinkinfo
 mkdirmkdir
 move_uploaded_filemove_uploaded_file
 pclosepclose
 popenpopen
 readfilereadfile
 readlinkreadlink
 renamerename
 rewindrewind
 rmdirrmdir
 statstat
 lstatlstat
 realpathrealpath
 symlinksymlink
 tempnamtempnam
 tmpfiletmpfile
 touchtouch
 umaskumask
 unlinkunlink

previousfputs
fscanfnext

Last updated: Sat, 17 Mar 2001
view this page in English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Spanish | Plain HTML

fread

(PHP 3, PHP 4 )

fread -- Binary-safe file read

Description

string fread (int fp, int length)

Fread() reads up to length bytes from the file pointer referenced by fp. Reading stops when length bytes have been read or EOF is reached, whichever comes first.


// get contents of a file into a string
$filename = "/usr/local/something.txt";
$fd = fopen ($filename, "r");
$contents = fread ($fd, filesize ($filename));
fclose ($fd);
      

See also fwrite(), fopen(), fsockopen(), popen(), fgets(), fgetss(), fscanf(), file(), and fpassthru().

previousfputs
fscanfnext

Last updated: Sat, 17 Mar 2001
add note | about notes

show source | credits | mirror sites:  

Copyright © 1998-2001 The PHP Group
All rights reserved.
This mirror generously provided by: L'Université Michel de Montaigne Bordeaux III
Last updated: Tue Mar 20 07:31:16 2001 MET