server_error ();
}
}
- return basename($dest);
+ return basename_safe ($dest);
}
function img_check_upload ($file) {
while ($counter < 1000) {
if (!file_exists ($filename) &&
- !($con->imgpath_exists (basename ($filename)))) {
+ !($con->imgpath_exists (basename_safe ($filename)))) {
return $filename;
} else {
$counter++;
return $host;
}
+function basename_safe ($path) {
+ return end (explode ("/", $path));
+}
+
function unquote($gpc_str) {
if (!isset ($gpc_str)) {
return $gpc_str;