<html>
<body>
<?php
$filename = '/home/www/lhtaz/DBDump.csv';
$handle = fopen($filename, "w+");
if (file_exists($filename)) {
echo "The file $filename exists!!<br>";
} else {
echo "The file $filename does not exist<br>";
}
/ Then I set up the link to the database and the correct table, retrieve the records in a for-next loop (all of which work, since I can echo them to the screen). Then this: /
$dos_rec = "string of values separated by commas". chr(13) . chr(10);
if (is_writable($filename)) {
if (!fwrite($handle, $dos_rec)) {
echo ("Cannot write to file $filename<br>");
exit;
} else {
echo $dos_rec . "<br>";
}
} else {
echo ($filename . " IS NOT writable!<br>");
exit;
}
/ For - next loop then ends, then: /
fclose($handle);
?>
Then I go to look for the file, but IT'S NOT THERE!
Thanks.