Alguien me puede decir el porqué?
Código PHP:
<?php
$directorio = '../temp/';
$files = $directorio .$_FILES['Filedata']['name'];
move_uploaded_file($_FILES['Filedata']['tmp_name'], $files);
$nom = substr(md5(uniqid(rand())),0,6);
CrearFoto($_FILES['Filedata']['name'], 200, 200, $nom);
function CrearFoto($file, $ancho, $alto, $nom){
$img = imagecreatefromjpeg("../temp/".$file);
$imagen = imagecreatetruecolor($ancho, $alto);
imagecopyresized($imagen, $img, 0, 0, 0, 0, $ancho, $alto, ImageSX($img), ImageSY($img));
imagejpeg($imagen, "../fotos/".$nom.".jpg", 100);
}
unlink($files);
?>