Is there a way to remove files from the filemanager through php? What I mean is, you can upload files to the server and specify the folder you want it in using an upload algorithm, however I have not seen any way to reverse the proccess, can I delete those uploaded files through php code? And if so can anyone point me in the right direction to get started learning how?
GraficRegret 0 Junior Poster
Recommended Answers
Jump to PostLastMitch is precisely correct, unlink is something you cannot reverse. For safety precaution, you need to test it on dummy files first, before allowing the script to work on real uploaded files. The use of unlink() with glob() is even dangerous than just using regular dir php function.
example of …
Jump to PostAgree with everything above. As an additional 'brake', you could hijack the 'delete' link or button action and force a js confirm box. Then ajaxify the delete process. This doesn't necessarily make it safer, just give you pause to think 'did I press the right button/link?'
All 8 Replies

LastMitch
GraficRegret 0 Junior Poster

LastMitch
GraficRegret 0 Junior Poster
veedeoo 474 Junior Poster Featured Poster
GraficRegret 0 Junior Poster

diafol
GraficRegret 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.