How to create folder using php.
Use mkdir() function to create new folder using php.
<?php
mkdir('foldername');
?>
We can also specify the full path to create folder as follows,
<?php
mkdir('C:/xampp/htdocs/foldername', 0777);
?>
Here 0777 is specified to give the permission. Click here to check more about file permissions.
For more php related queries check this link
Written By
thesyntaxsource
Related Posts
Forest Fire – Techgig, All testcases passed. Challenge #1
Forest FireĀ (100 Marks) Challenge 1: Forest fire You are camping in a forest area at night. You are living with the forest officers to experience their challenges…
Read MoreThe Magic Wand – TechGig PHP answer, all test cases passed. Challenge #2
The Magic Wand – TechGig PHP answer – all testcases passed The Magic Wand (100 Marks) You are a wizard who possesses the magic wand that can be…
Read More