This is the script that I am using to unlink my files and folders. It seems to work very well, you can just put a folder name in if you want to delete all the files in it, but then you have to ftp in or go through the control panel and delete them manually after running the script below. If you are just deleting certain files then this will automatically delete them for you. For some reason when you execute the script it gives you a "Warning: operation not permitted....." error message - but it still works. I haven't figured that one out yet!
Hope this helps.
PHP Code:
<?php
chmod("folder/file.html", 0777); // let the system put it open
chown("folder/file.html", 0730); //scripts UID becomes owner
unlink("folder/file.html"); //delete the file
?>
cPanel.net Support Ticket Number: