cgi script that reads and appends to a file

file name:
/home/virtual/site94/fst/var/www/html/testfiles/test.txt
trying to open file for read
Sorry, cannot open file for read
contents of file:


done reading file

trying to open the same file for write (append)
Sorry, cannot open file for write
writing to file at = 12/16/2017 10:22:43 PST
test.cgi wrote to file at = 12/16/2017 10:22:43 PST
NEXT file name:
/home/virtual/site94/fst/var/www/html/testfiles/testnext.txt
trying to open NEXT file for read
Sorry, cannot open NEXT file for read
contents of NEXT file:


done reading NEXT file

trying to open NEXT file for over-write
Sorry, cannot open new file for write
writing to NEXT file at = 12/16/2017 10:22:43 PST
NEW file name:
/home/virtual/site94/fst/var/www/html/testfiles/testnew.txt

trying to open NEW file for write
Sorry, cannot open new file for write

run this script again

access this file via java servlet

Karl Brown midi servlet home page