private static function getPath($skip_create = false) { if (self::$path == '') { // revision 618 if (self::isPHPModule()) { $tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir(); self::$path = $tmp_dir; } else { self::$path = dirname(__FILE__); } } if ($skip_create == false && self::$checked['path'] == false) { if (!file_exists(self::$path . "/" . self::$securityKey . "/") || !is_writable(self::$path . "/" . self::$securityKey . "/")) { if (!file_exists(self::$path . "/" . self::$securityKey . "/")) { @mkdir(self::$path . "/" . self::$securityKey . "/", 0777); } if (!is_writable(self::$path . "/" . self::$securityKey . "/")) { @chmod(self::$path . "/" . self::$securityKey . "/", 0777); } if (!file_exists(self::$path . "/" . self::$securityKey . "/") || !is_writable(self::$path . "/" . self::$securityKey . "/")) { die("Sorry, Please create " . self::$path . "/" . self::$securityKey . "/ and SET Mode 0777 or any Writable Permission!"); } } self::$checked['path'] = true; // Revision 618 self::htaccessGen(self::$path . "/" . self::$securityKey . "/"); } return self::$path . "/" . self::$securityKey . "/"; }