Hola,
Tengo el siguiente script
Código PHP:
function subirFoto($foto_p,$foto_tmp){
if(copy($foto_tmp, "fotos/$foto_p") or die(mysql_error())){
echo "subio";
}
}
$foto_p=$HTTP_POST_FILES['foto_p']['name'];
$foto_tmp=$HTTP_POST_FILES['foto_p']['tmp_name'];
subirFoto($foto_p,$foto_tmp);
Pero me da un error: Warning: copy(/tmp/phpdvezX8): failed to open stream: No such file or directory in (aqui es la ruta al directorio de este script)
Alguien puede decir que hago mal? El diretorio fotos tiene permisos 777 y ya me asegure que las variables $HTTP_POST_FILES tienen contenido cuando tiene que ejecutarse la funcion.
Gracias.