Latest web development tutorials

PHP fclose() 函數

PHP Filesystem 參考手冊 完整的PHP Filesystem參考手冊

定義和用法

fclose() 函數關閉打開的文件。

該函數如果成功則返回TRUE,如果失敗則返回FALSE。

語法

fclose(file)

参数 描述
file 必需。规定要关闭的文件。


實例

<?php
$file = fopen("test.txt","r");
//some code to be executed
fclose($file);
?>


PHP Filesystem 參考手冊 完整的PHP Filesystem參考手冊