<?php

/*
$file_path = '/user01/work/gfg.txt'; 
  
if (file_exists($file_path)) { 
    echo "The Given file already exists in GEEKSFORGEEKS directory"; 
} 
else { 
    echo "The file path doesn't exists in GeeksforGeeks directory"; 
} 
  
  
  // Checking whether a file is directory or not 
if (is_dir($gfg_directory)) 
    echo ("Given $gfg_directory exists in GeeksforGeeks Portal"); 
else
    echo ("Given $gfg_directory doesn't exists in GeeksforGeeks Portal"); 
*/  
  
  
			if (isset( $_POST['createfolder'] )) 
			{
				$folder_name=$_POST['createfolder'];
				if (!file_exists($output_dir . $folder_name))/* Check folder exists or not */
				{
					@mkdir($output_dir . $folder_name, 0777);/* Create folder by using mkdir function */
					echo "Folder Created";/* Success Message */
				}
			}
  
  ?>
  
  
  
  
  
<!DOCTYPE html>
 <html>
 <body>
<form action="CreateFolder.php" method="post">
    <h2>
        Create New Folder
    </h2>
    <input name="createfolder" type="text">
    <input type="submit" value="Create Folder">
</form>
</body>
</html>
  
