PDA

View Full Version : File removal



Shibby-Shabs
27-09-2009, 04:47 AM
I have a file uploader working. I don't know how to ask so I'll say what I won't. I to be able to allow users to delete files from the directory where all the images are, the list would be like the index of the directory where it usualy says:


Index of /forum/images/awards

Parent Directory
PH.png
base.png
ploob.png

DeejayMachoo$
27-09-2009, 08:21 AM
The code too delete PH.png is


unlink("path/to/PH/png");

Shibby-Shabs
27-09-2009, 09:43 AM
So I'm new to php, how would i use that?

LMS16
27-09-2009, 02:31 PM
Well, if you use a database to store IPs, usersname, ids ect...

Im sure if when they upload a file, you could make an entry in the database, specifying the file link, name and who owns that file and they make a list of files that are linked with their accounts and delete the file from there...

Shibby-Shabs
27-09-2009, 02:40 PM
Yeah I just won't it so they click something and it deletes if it can be that simple

LMS16
27-09-2009, 02:43 PM
Theres only the creator that can make it simple.

Teabags
27-09-2009, 02:45 PM
Just to jump on the band wagon abit. I coded a keylogger to my computer. Deleted the compiler and now cannot delete the .exe format of the keylogger.

LMS16
27-09-2009, 02:47 PM
Just to jump on the band wagon abit. I coded a keylogger to my computer. Deleted the compiler and now cannot delete the .exe format of the keylogger.

And that has what to do with this:S

Shibby-Shabs
28-09-2009, 01:35 AM
Are you trying to say we shouldn't trust you?

Want to hide these adverts? Register an account for free!