$pathfoto = "../uploadimg/directory/";
$nufotoext = strrchr($nufoto_name,'.');
echo $nufoto . " # " . $nufoto_name . " # " . $nufoto_size . " # " .$nufotoext . " # " .$pathfoto . "<br>\n";
echo "1<br>\n";
if(is_dir($pathfoto)){
echo $pathfoto . " esiste<br>\n";
} else {
echo $pathfoto . " non esiste<br>\n";
}
if(is_writable($pathfoto)){
echo $pathfoto . " scrivibile<br>\n";
} else {
echo $pathfoto . " non scriv<br>\n";
}
if(is_file($pathfoto.$nufoto_name)){
echo $nufoto_name . " esiste<br>\n";
echo "<a href='".$pathfoto.$nufoto_name."' target='_blank'>open ".$nufoto_name."</a>";
} else {
echo $nufoto_name . " non esiste<br>\n";
}
exec("mv -f $nufoto '".$pathfoto.$nufoto_name."'");
//
echo "2<br>\n";
if(is_file($pathfoto.$nufoto_name)){
echo $nufoto_name . " esiste<br>\n";
echo "<a href='".$pathfoto.$nufoto_name."' target='_blank'>open ".$nufoto_name."</a>";
} else {
echo $nufoto_name . " non esiste<br>\n";
}