Topic: need help writing a script that can simply clear or delete a file (Read 499 times)
aka J Love Community Supporter?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits Members referred : 4
« on: Dec 13, 2005, 03:22:31 AM »
i want to write a script that performs a simple task. when u click a link or button, it will automatically delete a file, or clear that file. is this possible? and if so how would it be done? im using a form to write to this file, its CSV but the same would work with a txt file. i want to be able to clear it from the website by just clicking a link/button.
aka J Love Community Supporter?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits Members referred : 4
« Reply #4 on: Dec 13, 2005, 09:36:36 PM »
its just a single file that creates itself everytime u save changes on the script i have written. so the php script to delete it could delete it completely, or just clear it. doesnt matter. currently the file is located in the same dir as the script, its a csv file.
aka J Love Community Supporter?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits Members referred : 4
« Reply #10 on: Dec 13, 2005, 10:25:30 PM »
great man it works now! i should of known to chmod it im not that stupid.. but how to we tell the script to reload the page u were on once its finished clearing it? because it shows a blank page if its successful when i want it to show either the same page (index.htm) or a pop-up confirmation or something