PHP Tutorial Tutorials - PHP File Close

PHP File Close

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);
?>
Date:2019-10-01 02:55:24 From:www.Lautturi.com author:Lautturi