phpbar.de logo

Mailinglisten-Archive

[php] Auf fclose verzichten

[php] Auf fclose verzichten

Sebastian Mendel lists at sebastianmendel.de
Die Jun 21 13:17:35 CEST 2005


Tom Horstmann wrote:

> mit fOpen () geöffnete Dateien werden bei script-Ende automatisch
> geschlossen:
> 
> http://www.onlamp.com/pub/a/php/2002/10/03/php_foundations.html
> Once a file reference has been created, and any reading/writing done
> to the file opened is complete, it is necessary that the file be closed
> before it can be opened again. Although all file references are
> automatically closed upon the termination of the PHP script which
> opened them, it is good programming practice to close the files
> manually. To do this, PHP provides the fclose() function. This
> function takes a single parameter (the file reference) and returns
> a boolean value indicating the success or failure.


"it is good programming practice to close the files
manually"



-- 
Sebastian Mendel

www.sebastianmendel.de
www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet

php::bar PHP Wiki   -   Listenarchive