The following text: This article mainly introduces the PHP file read and write operation related function Summary, this article summarizes fwrite (), Fread (), fgets (), fgetc (), file (), ReadFile () and other functions of the introduction and use
The PHP fread () function is used to read files (which can be used safely in binary files).
This article introduces you to FreadRead file
example, and a few points to note when using this function to read a file, a friend you need can refer to.
Introduction to PHP fread functions
string fread (int handle, int length)
Fread () reads up to length bytes from a file pointer handle. The function stops reading a file when it has read up to a maximum length of bytes, or when it reaches EOF, or
Description
string fread (int handle, int length)
Fread () reads up to length bytes from a file pointer handle. The function stops reading the file when it has read up to the maximum length of bytes, or when it reaches EOF, or (for a network stream)
Description
string fread (int handle, int length)
Fread () reads up to length bytes from a file pointer handle. The function stops reading the file when it has read up to the maximum length of bytes, or when it reaches EOF, or (for a network stream)
fread
and
fgets
the difference between:Fread: Computes the length in byte bits, reads the data at the specified length and number, stops after it encounters the end or completes the specified length read.
Fgets: Full row reads, encounters carriage
The Fread (), fgets (), fgetc (), file_get_contents (), and file () functions are used to read content from a file. Fread ()The Fread () function is used to read the file (it can be used safely in binary files)Syntax: string fread (int handle,int
DescriptionString fread (int handle, int length)Fread () reads a maximum of length bytes from the file pointer handle. This function can be read by a maximum of length bytes, or when it reaches the EOF, or (for network streams) when a package is
Description
String fread (INT handle, int length)
Fread () reads a maximum of length bytes from the file pointer handle. This function can be read by a maximum of length bytes, or when it reaches the EOF, or (for network streams) when a package is
Description
string fread (int handle, int length)
Fread () reads up to length bytes from the file pointer handle. The function stops reading a file when it reads up to a maximum length of bytes, or when it reaches EOF, or (for a network stream) when
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.