Taking too long? Close loading screen.
Opening Up A New Dimension

Create a folder using PHP

Posted by: Herald Lynx Comments: 0 0 Post Date: May 26, 2016

This short article covers how to create folder using php. Create a file named foldercreate.php and paste the following code in it to see the result.

// Desired folder structure
$structure = './depth1/depth2/depth3/';

// To create the nested structure, the $recursive parameter
// to mkdir() must be specified.

if (!mkdir($structure, 0777, true)) {
die('Failed to create folders...');


Share this post

Leave a Reply