TypeError thrown

ftp_fput(): Argument #1 ($ftp) must be of type resource, null given