stat('backup_post_data')) return; // Append to the file if(!file_exists(BACKUP_DIR)) mkdir(BACKUP_DIR, 0775, true); $backupFile = fopen(BACKUP_DIR . '/' . $form->class, 'a'); $date = date('Y-m-d G:i:s'); $postData = var_export($data, true); $backup = <<class} $postData ***END ENTRY*** BAK; fwrite($backupFile, $backup); fclose($backupFile); } } ?>