Created
May 19, 2015 22:11
-
-
Save ahalbert/a53b9d02cc5f57403d49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function safeCreateDir($dir, $exit = true) { | |
| if (!file_exists($dir)) { | |
| if (!mkdir($dir, 0700, true)) { | |
| $processUser = posix_getpwuid(posix_geteuid()); | |
| error_log($dir." ".implode($processUser)); | |
| if ($exit) { | |
| debugMail('failed to create dir: ' . $dir, true); | |
| } | |
| return false; | |
| } | |
| } | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment