HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Write to an open file
The fwrite() writes to an open file.
The function will stop at the end of the file (EOF) or when it reaches the specified length, whichever comes first.
Parameter | Description |
---|---|
file | Required. Specifies the open file to write to |
string | Required. Specifies the string to write to the open file |
length | Optional. Specifies the maximum number of bytes to write |
Return Value: | The number of bytes written, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes |
❮ PHP Filesystem Reference