Writing Files

Open file, write string, close file

file_put_contents(file) ;

 

Returns number of bytes written upon success, or FALSE upon failure

 

If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flag is set.

 

Wite opened file

fwrite(file, string) ;

 

Returns number of bytes written upon success, or FALSE upon failure

 

Leave a Reply