/** * The mkdir() recursive flag doesn't work under php4. So we have to * define our own function to create dirs recursively. * * @param string $pathname * @param int $mode * @return boolean */ function recursiveMakeDir($pathname, $mode) { is_dir(dirname($pathname)) || PhotoQHelper::recursiveMakeDir(dirname($pathname), $mode); return is_dir($pathname) || @mkdir($pathname, $mode); }