The PHP fclose() function is used to close a opened file.
(Although PHP automatically closes all open files when script terminates but it's a good practice to close a file once you have finished working with it.)
Syntax:
fclose ( $handle)
<?php $handle = fopen("data.txt", "r"); // operations such as read write // fclose($handle); ?>