codice:
$f = 'file_da_cancellare.ext';
if ( unlink( $f ) == true )
  echo 'file cancellato';
else
  echo 'errore';