Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

PHP Function fclose()


previous

Syntax

bool fclose ( resource $handle );

Definition and Usage

The file pointed to by handle is closed.

Paramters

ParameterDescription
handleThe file pointer must be valid, and must point to a file successfully opened by fopen() or fsockopen().

Return Value

Returns TRUE on success or FALSE on failure.

Example

Following is the usage of this function:

<?php
$handle = fopen('example.txt', 'r');

fclose($handle);
?>

previous Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names