PHP fclose()関数
❮PHPファイルシステムリファレンス例
ファイル「test.txt」を開いて閉じます。
<?php
$file = fopen("test.txt", "r");
fclose($file);
?>
定義と使用法
fclose()関数は、開いているファイルポインタを閉じます。
注:ファイルは fopen()またはfsockopen()によって開かれている必要があります。
構文
fclose(filepointer)
パラメータ値
Parameter | Description |
---|---|
filepointer | Required. Specifies the file to close |
技術的な詳細
戻り値: | 成功した場合はTRUE、失敗した場合はFALSE |
---|---|
PHPバージョン: | 4.0以降 |
❮PHPファイルシステムリファレンス