fclose() function closes the file : fclose « File Directory « PHP
- PHP
- File Directory
- fclose
fclose() function closes the file
int fclose (int filepointer)
<?
$file = "data.txt";
if (file_exists($file)) :
$fh = fopen($file, "r");
fclose($fh);
else:
print "File $file does not exist!";
endif;
?>
Related examples in the same category