Si vas a la funcion unlink del manual php hay un post que dice lo siguiente:
I have founda that trying to delete a file using relative path like the example below does not work.
Código PHP:
<?php
$do = unlink("../pics/$fileToDel");
if($do=="1"){
echo "The file was deleted successfully.";
} else { echo "There was an error trying to delete the file."; }
?>
I did not work at all, instead what I had to do was: Código PHP:
<?php
chdir('../pics/');
$do = unlink($fileToDel);
if($do=="1"){
echo "The file was deleted successfully.";
} else { echo "There was an error trying to delete the file."; }
?>
Then it worked !
No se si sera lo mismo para una ruta absoluta, pero por lo menos vale la pena intentarlo