note 22993 deleted from function.fclose by philip
| From: | philip@php.net | Date: | Sat, 19 Oct 2002 17:31:56 +0000 |
| Subject: | note 22993 deleted from function.fclose by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-38298@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.