Creating a Directory in PHP


Use mkdir() to create a new directory.

Source Code

if (!file_exists('path/to/directory')) {
    mkdir('path/to/directory', 0777, true);
    echo "Directory created.";
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments