Thursday, March 10, 2011

Recursively create folder

This is an easy way to recursively create folders in PHP

$oldumask = umask(0);
mkdir('./backupfiles/depth1/depth2/depth3/', 0777, true); // or even 01777 so you get the sticky bit set
umask($oldumask);

No comments:

Post a Comment