fwrite
(PHP 3, PHP 4 >= 4.0.0)fwrite -- Binary file writing description
int fwrite (int fp, string string [, int length])
fwrite() writes characters String the contents of string into the file stream specified by fp. If length is given, it will end after writing the bytes specified by length.
Note that if the length parameter is given, the website construction server script class PHPPHP User Manual fancyconfiguration.html#ini.magic-quotes-runtime>magic_quotes_runtime configuration option will be ignored, and the "" in the string will not be deleted. .
Note: On some systems where a distinction will be made between binary and text files (i.e. Windows), this file must be opened using mode fopen() with the b argument.
See fread(), fopen(), fsockopen(), popen(), and fputs().