fclose
Close an open file pointer
fclose()
function closes an open file.
<?php $file = fopen ( "test.txt" , "r" ) ; //Some code executed... fclose ( $file ) ; ?>
fclose ( file )
parameter | describe |
---|---|
file | Required. Specifies documents to be closed. |
The file parameter is a file pointer. The fclose()
function closes the file pointed to by the pointer.
Return true if successful, otherwise return false.
The file pointer must be valid and is successfully opened via fopen()
or fsockopen()
.