Create a directory using PHP

Create a directory using PHP and MySQL.


<!DOCTYPE html>
<form action="CreateFolder.php" method="post">
Create New Folder
<input name="createfolder" type="text">
<input type="submit" value="Create Folder">


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 */

Praveen Kumar

I am a fullstack web developer with a passion for SEO, creating stunning websites, and organic marketing. I am a perfectionist.

Post navigation