September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool fputs(resource file_handle, string data, [int bytes])
Writes to a file.
Returns:
TRUE on success; FALSE on error
Description:
fputs() writes the data given in data to the specified file. The optional bytes argument denotes the maximum number of bytes to be written to the file (useful if you don’t want to dump all of the data contained in the data string). This function is an alias for fwrite() and thus is binary-safe. This means that both binary data (such as an image), and character data can be written with this function.
Note that in the original C libraries fputs() is meant for writing textual data only; thus, using fputs() for binary data is considered bad style.
Warning:
Because some of the filesystem functions to read/write ...
Read now
Unlock full access