Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/09/2010, 12:43
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: numerar archivo con funcion recursiva

¿Algo así?
Código PHP:
Ver original
  1. <?php
  2. $i = 1;
  3. while(true){
  4.     $file = 't-' . $i++ . '.txt';
  5.     if(!file_exists($file)){
  6.         touch($file);
  7.         break;
  8.     }
  9. }
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos