I have the following directory c:/files and I’m trying to create a wrapper function which emulates mkdir()’s functionality except works on more then one folder e.g.
mkdir works fine on the following:
mkdir('c:/files/games', 0777);
But not on this:
mkdir('c:/files/games/say/yes', 0777);
Heres some rough code to further describe what I’m trying to achieve:
function mmkdir($path, $chmod = 0777) {
/* do some loop or something with mkdir()? here */
}
mmkdir('C:/tmp/something/something');
mmkdir('C:/tmp/go/something');
mmkdir('C:/tmp/yes');
Call the
mkdir()function with the recursive parameter set toTRUE. For example: