array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'function.fclose.php', 1 => 'fclose', ), 'up' => array ( 0 => 'ref.filesystem.php', 1 => 'Fonctions sur les systèmes de fichiers', ), 'prev' => array ( 0 => 'function.diskfreespace.php', 1 => 'diskfreespace', ), 'next' => array ( 0 => 'function.fdatasync.php', 1 => 'fdatasync', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'fr', 'path' => 'reference/filesystem/functions/fclose.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
fclose — Ferme un fichier
stream
Le pointeur de fichier doit être valide et doit avoir été correctement ouvert par la fonction fopen() ou la fonction fsockopen().
Exemple #1 Exemple avec fclose()
<?php
$handle = fopen('somefile.txt', 'r');
fclose($handle);
?>