ң

fread

(PHP 3, PHP 4)

fread - Binary-safe .

string fread (int fp, int length)

fread() length , fp . , length EOF ( ), ң.

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

: , (Windows), 'b' fopen() .

$filename = "c:\\files\\somepic.gif"; $fd = fopen ($filename, "rb"); $contents = fread ($fd, filesize ($filename)); fclose ($fd);

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


ң
fputs fscanf