How can I delete a file using CGI if it becomes too large?
For instance: I have a file but don't want it to be larger than 10kb. If it reaches 10Kb the script should emtpy the file it and start writing data in now empty file.
First, the CGI process must have sufficient permissions
to play with the file. If it does, just check the size
of the file and either open it to append or open it to
write (overwrite).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.