Re: Basic Question about closing a file
| From: | Scott Carr | Date: | Thu, 12 Sep 2002 19:52:08 +0000 |
| Subject: | Re: Basic Question about closing a file | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15783@lists.php.net to get a copy of this message | ||
Modifications inline to try.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
$OpenCSV = fopen ($FileCSV, "w");
if ($OpenCSV === FALSE) {
print ("The query could not be executed!<BR>\n");
} else {
print ("The Sales CSV file was opened successfully<BR>\n");
}
while { // stuff is happening w/ database and calculations here
fwrite ($OpenCSV, "$Orders_id,$Products_id, etc ...\n");}
$FC = fclose ($OpenCSV);
if ($FC == FALSE) {
print ("The Sales CSV could not be executed!$FC<BR>\n");
} else {
print ("The Sales CSV file was Created successfully$FC<BR>\n");
}
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/