Closes a file.
fclose() is used on file handles to close files. It returns TRUE on success and FALSE on failure.
<?php
$logfile = fopen("log.txt", "r");
// read the file
if (fclose($logfile))
print "File closed";
?> File closed A file is opened and closed.