Well, here's the code:
function delete_file($which_one) {
if (unlink($which_one)) {
echo "$which_one deleted.";
} else {
echo "$which_one: delete failed.";
}
}
Here's the error:
Warning: unlink( photos/butterflyMilkweedweb.jpg ) [function.unlink]: No such file or directory in /ApacheServer/ApacheDocRoot/sites_in_progress/crc/view_photos.php on line 16
photos/butterflyMilkweedweb.jpg : delete failed.
I checked and found that there IS a directory "photos" on the same level as the file view_photos.php.
In that directory is butterflyMilkweedweb.jpg.
So, the path "photos/butterflyMilkweedweb.jpg" should be correct.
This also does not work: "/photos/butterflyMilkweedweb.jpg"
... something I'm not seeing here.