I used the following line to create a directory on my server:
mkdir("/var/www/cache/$directory", 0700);
Then I copied some files into it using this:
copy($remote, $local);
Now I'm trying to delete the directory and all of its file with this, but it will not work:
$local = "/var/www/cache/$directory";
$removed = unlink($local);
Is there anyway to do this with a one-liner and not a for loop or the such?