Yo haria lo siguiente:
Código PHP:
Ver originalswitch($extension) {
case 'jpg':
case 'png':
case 'gif':
$method = 'save_' . $extension;
break;
default:
return false;
}
if($thumb->$method($path . $folder, $name)){
echo "File stored in: " . "<input class='url' type='text' value='". $folder . $file."' />";
}
else {
echo "write permission problem in ". $path ." folder. It should be 777.";
}