Open the file “test.txt” and then close it.
<?php $file = fopen(“test.txt”, “r”); fclose($file); ?> |
The fclose() function closes an open file pointer.
Note: The file must have been opened using fopen() or fsockopen().
fclose(filepointer) |
Parameter |
Description |
filepointer |
Mandatory. Specifies the file to be closed. |
Return Value: |
Returns TRUE on success and FALSE on failure. |
PHP Version: |
4.0+ |