Tag Archives: PHP

PHP Script to Delete Files on Server (from a folder)

PHP SCRIPT TO DELETE FILES ON SERVER?
(OR how to set up a script that ONLY deletes the contents of a folder and NOT the folder itself)

Objective: You need to create a PHP script and place it in your ROOT directory

Disclaimer: Read directions and MAKE SURE your path is correct or you could end up deleting stuff you didn’t want to
(in other words run a test after you’ve backed up your site)

———————————-
You need to create a PHP script and place it in your ROOT directory

1- to do this, create a text document and paste in the following code: Continue reading PHP Script to Delete Files on Server (from a folder)