I have a serious problem space on my server and due to my learning php as I go have quite a few obsolete files on my server.
These are files uploaded by clients of mine and all I want to do is to write a small program to delete files not found in the database.
I thought basically something along the lines of:
$filename = ???????
Select * from database where filename=$filename etc
$result = num_rows etc
if(empty($result)) { unlink $filename ; }
The coding I can do - I just need that first bit - how do I run through all the files in a folder and access the filename?
Should be simple......
Thanks