English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The fclose() function closes all open files, and returns true if successful; otherwise, it returns false.
bool fclose ( resource $handle )
The file pointer must be valid and must point to a file successfully opened by the fopen() or fsockopen() function.
<?php $handle = fopen("/PhpProject/sample.txt", "r"); fclose($handle); echo "File closed successfully"; ?>
Output Result
File closed successfully