ftp_connection::unlink

Description

Deletes the specified file from the server.

Syntax

bool ftp_connection::unlink (string $ftp_file)



Parameter $ftp_file

Expected type: String
Description: The file to delete



Return value

Expected type: Boolean
Description: Whether or not the operation was successful


Notes

  • Example: $package_ftp->unlink('myfile.txt');
  • Sends the DELE command to the FTP server
  • Checks for a valid connection before continuing
  • Checks for a 250 response code (Requested file action ok, completed)
  • Sets a 'bad_file' error if the command wasn't successful
  • Returns false if there's no valid connection or the command was unsuccessful
Advertisement: