I have a strange issue: I am trying to unlink a file from a subfolder.
So the subfolder is folder1
My unlink looks like this:
unlink("uploads/sfm/c4ca4238a0b923820dcc509a6f75849b/".'folder1/'.$_GET['delete']);
Result: he deletes the file out of the folder.
To catch the foldername, i use basename();
This shows me my current dir: basename($dir);
When i echo basename($dir);
het outputs: folder1
So i put the basename in the unlink like this:
unlink("uploads/sfm/c4ca4238a0b923820dcc509a6f75849b/".basename($dir).'/'.$_GET['delete']);
Result: i cannot delete the file anymore!
basename($dir) == folder1
What is going wrong?