TUTORIALBackendFETCHED
PHP fclose() 函数
PHP fclose() 函数 完整的 PHP Filesystem 参考手册 定义和用法 fclose() 函数关闭打开的文件。 该函数如果成功则返回 TRUE,如果失败则返回 FALSE。 语法 fclose(file) 参数 描述 file 必需。规定要关闭的文件。 实例 <?php $file = fopen('test.txt',&..
Updated 7/16/2026
Tutorial detail pages default to noindex.
PHP fclose() 函数
完整的 PHP Filesystem 参考手册
定义和用法
fclose() 函数关闭打开的文件。
该函数如果成功则返回 TRUE,如果失败则返回 FALSE。
语法
fclose(file)
| 参数 | 描述 |
|---|---|
| file | 必需。规定要关闭的文件。 |
实例
<?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);
?>
完整的 PHP Filesystem 参考手册