note 22993 added to function.fclose

From: Date: Sat, 06 Jul 2002 06:24:19 +0000
Subject: note 22993 added to function.fclose
Groups: php.notes 
Request: Send a blank email to php-notes+get-32667@lists.php.net to get a copy of this message
ok guys... just to make things clear, you must close the pointer to the file not the file it self. What am I talking about? Ok here it is: Lets say you opened a file like this> FOpen("C:\myfile\newfile.data") and then you try to close this file like this> FClose("C:\myfile\newfile.dat") you will get an error message. The rigth way is: $FilePointer = FOpen("C:\myfile\newfile.dat") FClose($FilePointer) This saves memory and ensure no file corruption. I also agree with the above posted message. Close any file you open! George Andre P. -- http://www.php.net/manual/en/function.fclose.php http://master.php.net/manage/user-notes.php?action=edit+22993 http://master.php.net/manage/user-notes.php?action=delete+22993 http://master.php.net/manage/user-notes.php?action=reject+22993

« previous php.notes (#32667) next »