hi everyone !
im currently trying to upload a image with a form to my webserver, the only problem i find is , the php sends me a error saying
Warning: rename(photo/,okokok.jpg): Permission denied in /home/website/public_html/photos/photo.php on line 49
and i already setup permission 777 to the folder :mad:
im currently using this code that takes the foto, renames it and the uploads it
if anyone knows of a better code to do this, plz tell me ! !
$uploaddir = 'fotos/';
$uploadfile = $uploaddir . basename($_FILES['imagen']['name']);
$renamed = $evnt . $phile . ".jpg";
if (move_uploaded_file($_FILES['imagen']['tmp_name'], $uploadfile))
{
$ok = "La foto es correcta y fue subida.\n";
}
else
{
$error[] = "Posible ataque, cuidado con lo que haces!\n";
}
rename($uploadfile, $renamed);