print("Size: ". ftp_size($ftp, "README"). "BR>\n");
//get the last modification date
print("Modified: ".
date("Y-m-d", ftp_mdtm($ftp, "README")).
"BR>\n");
//close connection
ftp_quit($ftp);
?>
string ftp_mkdir(integer link, string directory)
The ftp_mkdir function creates a directory on the remote server. FALSE is returned if the
directory cannot be created.
<?
//connect to server
if(!($ftp = ftp_connect("localhost")))
{
print("Unable to connect!BR>\n");
exit();
}
//log in
if(!ftp_login($ftp, "anonymous", "corephp@localhost"))
{
print("Unable to login!BR>\n");
exit();
}
//create a new directory
$result = ftp_mkdir($ftp, "corephp");
if($result)
{
print("Created directory: $resultBR>\n");
}
else
{
print("Unable to create corephp directory!BR>\n");
}
//remove corephp directory
if(!ftp_rmdir($ftp, "corephp"))
{
print("Unable to remove corephp directory!BR>\n");
}
//close connection
ftp_quit($ftp);
?>