update : 2015.11.03
php.shukuma.com

검색:
 
 
Closes an open file pointer

fclose

(PHP 4, PHP 5, PHP 7)

fcloseCloses an open file pointer

설명

bool fclose ( resource $handle )

The file pointed to by handle is closed.

인수

handle

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

반환값

성공 시 TRUE를, 실패 시 FALSE를 반환합니다.

예제

Example #1 A simple fclose() example

<?php

$handle 
fopen('somefile.txt''r');

fclose($handle);

?>

참고

  • fopen() - Opens file or URL
  • fsockopen() - Open Internet or Unix domain socket connection