Re: Existing File...

From: Date: Wed, 12 Dec 2001 00:20:01 +0000
Subject: Re: Existing File...
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-10847@lists.php.net to get a copy of this message
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>

« previous php.windows (#10847) next »