In my project i m going to upload a resume in specified folder on server and the file name is going to be saved in database
A user can later update his information and can upload the another file.So i want to repalce the previous file with this new file from server folder and So how can i do that ! I m using A php code
Thanking you in advance !
how to replace the file from server folder
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I'm not sure why this is a security thread, but okay.
You're saving the filename in the database of the original. I'll presume that this filename is associated with the user, therefore you have the ability to find if they've uploaded a file before and what the filename is. You already know the location so it's a matter of maybe needing unlink(), but I don't remember absolutely needing it in many cases before calling move_uploaded_file().
You're saving the filename in the database of the original. I'll presume that this filename is associated with the user, therefore you have the ability to find if they've uploaded a file before and what the filename is. You already know the location so it's a matter of maybe needing unlink(), but I don't remember absolutely needing it in many cases before calling move_uploaded_file().