Why is the expected file not being deleted?

For unlinking, try:

function superDeactivation() {
   $myFile = "testFile.txt";
   if(is_file("$myFile")) {
   unlink("$myFile");
   }
}

Or alternatively:

function superDeactivation() {
   $myFile = "testFile.txt";
   unset($myFile);
   unlink("$myFile");
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)