- error_get_last: documentation ( source)
- error_clear_last: documentation ( source)
- unlink: documentation ( source)
- log: documentation ( source)
<?php
try{
if (! @unlink($cant_delete_this_file) ) {
throw new Exception("failed to unlink $cant_delete_this_file");
}
}catch( e ){
log( e.message );
log( error_get_last() );
error_clear_last();
}