2009-01-18 01:05:18 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.");
|
2009-01-18 03:12:00 +00:00
|
|
|
if (!file_exists(VARPATH)) {
|
2009-01-18 07:30:22 +00:00
|
|
|
if (!@mkdir(VARPATH)) {
|
2009-01-18 03:12:00 +00:00
|
|
|
throw new Exception("Unable to create directory '" . VARPATH . "'");
|
|
|
|
|
}
|
|
|
|
|
chmod(VARPATH, 0777);
|
|
|
|
|
}
|
|
|
|
|
foreach (array("resizes", "modules", "uploads", "logs", "albums", "thumbs") as $dir) {
|
2009-01-18 07:30:22 +00:00
|
|
|
if (!@mkdir("var/$dir")) {
|
2009-01-18 03:12:00 +00:00
|
|
|
throw new Exception("Unable to create directory '$dir'");
|
2009-01-18 01:05:18 +00:00
|
|
|
}
|
2009-01-18 07:18:41 +00:00
|
|
|
chmod("var/$dir", 0777);
|
2009-01-18 01:05:18 +00:00
|
|
|
}
|