How to create a folder using PHP Code
How to create a folder using PHP Code
<?php
if (!file_exists('RemplaceWithYourPath')) {
mkdir('RemplaceWithYourPath', 0777, true);
}
?>
Example:
<?php
if (!file_exists('E:/geek/geek2')) {
mkdir('E:/geek/geek2', 0777, true);
}
?>
Now save the file give it a name .
Step 2: Open the file in a browser (Explorer, Chrome, Mozilla Firefox)
Note: E:/geek/ is the computer path
and geek2 is the name you gave to the directory you want to create.
Commentaires
Enregistrer un commentaire