Portegag2’s Weblog

Just another WordPress.com weblog

Ultimos detalles

Posted by portegag2 on July 7, 2008

Que los nombres de los ficheros tengan caracteres estandar.

Solución:

he copiado una funcion y además les he quitado lso espacios:

Funcion:

function elimina_acentos($cadena){
$tofind = “ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ”;
$replac = “AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn”;
return(strtr($cadena,$tofind,$replac));
}

Recogida del nombre:

$imagen=str_replace(" ", "", elimina_acentos($_FILES["foto$k"]['name']));;

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>