ディレクトリを削除する
$ftp
$directory
FTP サーバー上の、指定した directory を削除します。
directory
ftp
FTP\Connection クラスのインスタンス
削除するディレクトリ。空のディレクトリへの絶対パス または相対パスでなければなりません。
成功した場合に true を、失敗した場合に false を返します。
true
false
例1 ftp_rmdir の例
<?php$dir = 'www/';// 接続を確立する$ftp = ftp_connect($ftp_server);// ユーザー名とパスワードでログインする$login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass);// $dir ディレクトリの削除を試みるif (ftp_rmdir($ftp, $dir)) { echo "Successfully deleted $dir\n";} else { echo "There was a problem while deleting $dir\n";}ftp_close($ftp);?>