Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ftp_rmdir(3) [php man page]

FTP_RMDIR(3)								 1							      FTP_RMDIR(3)

ftp_rmdir - Removes a directory

SYNOPSIS
bool ftp_rmdir (resource $ftp_stream, string $directory) DESCRIPTION
Removes the specified $directory on the FTP server. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $directory - The directory to delete. This must be either an absolute or relative path to an empty directory. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 ftp_rmdir(3) example <?php $dir = 'www/'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to delete the directory $dir if (ftp_rmdir($conn_id, $dir)) { echo "Successfully deleted $dir "; } else { echo "There was a problem while deleting $dir "; } ftp_close($conn_id); ?> SEE ALSO
ftp_mkdir(3). PHP Documentation Group FTP_RMDIR(3)

Check Out this Related Man Page

FTP_FPUT(3)								 1							       FTP_FPUT(3)

ftp_fput - Uploads from an open file to the FTP server

SYNOPSIS
bool ftp_fput (resource $ftp_stream, string $remote_file, resource $handle, int $mode, [int $startpos]) DESCRIPTION
ftp_fput(3) uploads the data from a file pointer to a remote file on the FTP server. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $remote_file - The remote file path. o $handle - An open file pointer on the local file. Reading stops at end of file. o $mode - The transfer mode. Must be either FTP_ASCII or FTP_BINARY. o $startpos -The position in the remote file to start uploading to. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 ftp_fput(3) example <?php // open some file for reading $file = 'somefile.txt'; $fp = fopen($file, 'r'); // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to upload $file if (ftp_fput($conn_id, $file, $fp, FTP_ASCII)) { echo "Successfully uploaded $file "; } else { echo "There was a problem while uploading $file "; } // close the connection and the file handler ftp_close($conn_id); fclose($fp); ?> SEE ALSO
ftp_put(3), ftp_nb_fput(3), ftp_nb_put(3). PHP Documentation Group FTP_FPUT(3)
Man Page