Got it to work using the code below.
I forgot the to put in the fclose ()function before the closing brace in my
first post.
Thank you D.
................................
<?
$filename="C:/My Documents/Linda/mydataz.txt";
if(file_exists($filename))
{
$msg="This file already exists.";
}
else
{
$newfile=@fopen($filename, "w+") or die("Couldn't create the file!");
fclose($newfile);
}
?>
<HTML>
<HEAD>
<TITLE>Creating a new file </TITLE>
</HEAD>
<BODY>
<? echo "$msg"; ?>
</BODY>
</HTML>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]