PHP fclose () function
Definition and Usage
fclose () function closes the file opened.
If successful the function returns TRUE, on failure returns FALSE.
grammar
fclose(file)
参数 | 描述 |
---|---|
file | 必需。规定要关闭的文件。 |
Examples
<?php
$file = fopen("test.txt","r");
//some code to be executed
fclose($file);
?>
$file = fopen("test.txt","r");
//some code to be executed
fclose($file);
?>
Complete PHP Filesystem Reference Manual