Delete file when new file is uploaded!

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
cap2cap10
Forum Contributor
Posts: 158
Joined: Mon Apr 14, 2008 11:06 pm

Delete file when new file is uploaded!

Post by cap2cap10 »

:banghead: Ok php technorati, this may seem simple, but how do I delete a file from a directory when a user uploads a new file to the directory. MySQL will store the file name. Hence, Update will add a new file name to the database replacing the old file name, but how do I get rid of the old file from the directory that stores the uploaded files. I am trying to remove garbage before it becomes a problem. Any takers?

Thanks in advance,

Batoe
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Delete file when new file is uploaded!

Post by John Cartwright »

Post Reply