note 35999 deleted from function.fclose by vincent

From: Date: Mon, 22 Sep 2003 14:25:22 +0000
Subject: note 35999 deleted from function.fclose by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-56911@lists.php.net to get a copy of this message
Note Submitter: agf@ihk.dk..ihatespam ---- If you are attempting to write a file and your disk quota is exceeded then you may not get any error message, and neither fopen, fwrite or fclose reports any failure. You can check for this error by calling fflush before fclose. fflush returns false if there is a disk quota exceeded error. Example: $f1 = fopen($filename, "w"); $f2 = fputs($f1, $data); $f3 = fflush($f1); $f4 = fclose($f1); if (!$f1 || !$f2 || !$f3 || !$f4) { echo "Error writing file $filename";} (observed on PHP version 4.1.1 running on FreeBSD v. 4.7)

« previous php.notes (#56911) next »