I have the following code:
<?
if (file_exists($superdat)) {die(print "The file $filename already exists. Rename it and send it up again.");}
if ($superdat_name != "")
{copy("$superdat", "/home/em/public_html/upload/files/$superdat_name") or
die("Couldn't copy file.");
} else
{die("No input file specified.");}
?>
I get this everytime regardless if it exists or not.
The file test.txt already exists. Rename it and send it up again.
I am new to PHP and I am just creating a simple way for printscreens to be sent up. This did work till I added file_exists also.... Any help would be appreciated !
Thanks,
ErocM