Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<body>
<?php
$mynewfolder = "./mynewfolder";
//$myNewFolderPath = "ftp://username:password@servername/root/somefoldername/" . $mynewfolder;
// use the variable above in case you have ftp server
if (!is_dir($mynewfolder)) { // if not exists
if ( mkdir($mynewfolder, 0700) ) {
echo "folder created!";
} else {
echo "something went wrong!";
}
}
else
{
rmdir($mynewfolder); // remove file
echo "folder removed!";
}
?>
</body>
</html>
The most helpful PHP solutions
detect browser phpPHP Click to see more ... 4.6K 408