PHP ftp_rmdir()Functions
Complete PHP FTP Reference Manual
Definition and Usage
The ftp_rmdir() function deletes a directory on the FTP server.
If successful, this function returns TRUE. If it fails, it returns FALSE.
Syntax
ftp_rmdir(ftp_connection,dir)
| Parameters | Description |
|---|---|
| ftp_connection | Required. Specifies the FTP connection to use. |
| dir | Required. Specifies the directory to delete. |
Examples
<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_rmdir($conn,"testdir");
ftp_close($conn);
?>
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
ftp_rmdir($conn,"testdir");
ftp_close($conn);
?>
Complete PHP FTP Reference Manual Other Extensions