- if (!is_dir($_SERVER["DOCUMENT_ROOT"]."/photo"))
- if (is_writable($_SERVER["DOCUMENT_ROOT"]))
- mkdir($_SERVER["DOCUMENT_ROOT"]."/photo");
+ $basepath = $a->get_basepath();
+ if (!is_dir($basepath."/photo"))
+ if (is_writable($basepath))
+ mkdir($basepath."/photo");