Summary: Closes an open file pointer
bool fclose(resource $handle)
The file pointed to by
handle is closed.
TRUE on success or
FALSE on failure.
- resource $handle: The file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen().
Example #1 A simple fclose() example
$handle = fopen('somefile.txt', 'r');