Ains, edito para decir que el problema persiste, el error que devuelve ahora es:
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /homepages/14/d298835367/htdocs/update.php on line 67
Warning: file_get_contents(
http://foro.elhacker.net/Smileys/cowboy/grin.gif) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /homepages/14/d298835367/htdocs/update.php on line 67
Warning: copy(/avatars/13.png) [function.copy]: failed to open stream: No such file or directory in /homepages/14/d298835367/htdocs/update.php on line 73
Creo que el problema esta en que el servidor no me deja acceder a ficheros mediante PHP.
El código es este:
if($avatarurl){
$alloweds = array('jpg','jpeg','png','gif','bmp'); if(!eregi('.', $avatar)){ echo "<script>alert(\"The avatar extension is missing!\");</script>";
echo "<meta http-equiv=\"refresh\" content=\"0; url=cp.php\">";
}else{
$extension = explode('.', $avatar); $extension = $extension[count($extension) - 1]; foreach($alloweds as $allowed){
$correct = true;
}
}
}
if ($correct != true) $correct = false;
if($correct==true){
$id = $data['id'];
$fp=fopen('temporal.dat','w');
copy('temporal.dat', "/avatars/$id.$extension"); $avatar = "/avatars/$id.$extension";
}else{
echo "<script>alert(\"The avatar has a wrong format!\");</script>";
echo "<meta http-equiv=\"refresh\" content=\"0; url=cp.php\">";
}
}
Pero el problema esta básicamente aqui:
$fp=fopen('temporal.dat','w');
copy('temporal.dat', "/avatars/$id.$extension");
Gracias de antemano!