$path = "/home/user1/public_html/files/";
sub PrintEnter{
#submit customer info to text file
$file = "$path" . "customers.txt";
if (-e $file) { #if the file exists...
print "$file<BR>exists"; #checksum to see if it reaches
this if statement
open(DAT, ">>$file"); #open the file for appending
Quote:
}
else {
print "$file<BR>does not exist"; #checksum to ensure it reaches this else
statement
open(OUTF,">$file"); #open the file for output
Quote:
}
print OUTF "$username|$customer\n";
close(OUTF);
Quote:
}
I continue to get the checksum for the else statement through the browser:
/home/user1/public_html/files/customers.txt
does not exist
It never creates the file and if I create the file myself and run it I get
the same thing files does not exist and yes it is pathed correctly, I went
as far as doing a pwd to get the current directory and cutting and pasteing
it into the script. I'm loosing my mind!!