![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/10/2005, 15:53
|
![Avatar de davidangel](http://static.forosdelweb.com/customavatars/avatar98706_1.gif) | | | Fecha de Ingreso: abril-2005
Mensajes: 124
Antigüedad: 19 años, 9 meses Puntos: 0 | |
mano aqui tenes una funcion
espero te sirva mas q eso la entiendasjaja
<?..
$i=inicio con cero --> 0
$a=nombrearchivo
function chec_name($a,$i) {
$file_name = trim($a);
$extension = strrchr($file_name,".");
$nombre = substr($file_name,0,strrpos($file_name,"."));
if($i==0){
$newfile = $file_name;
}else{
$newfile = $nombre."[".$i."]".$extension;
}
if(file_exists($newfile))
{
return $this->chec_name($a,$i+1);
}else{
return $newfile;
}
}
?>
suerte nos vemos
__________________ Angel de Madrid
-------------------------------------------------
guarda tus favoritos http://markerbox.com (no requiere correo) :arriba: |