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 參考手冊