Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/02/2008, 10:11
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Problema Campo For y While

Entonces hazlo a la inversa, prueba esto:
Código PHP:
<?php
$readdir 
opendir("./"); 
$files = array();
while (
false !== ($file readdir($readdir)))  

if (
$file != "." && $file != ".." && $file != "index.html" && $file != "imagenes.txt" && $file != "Thumbs.db" && $file != "back" && $file != "p_img.php")  { 
        
$files[] = $file;
}

closedir($readdir); 
///  

$imagenes explode"~""imagenes.txt" );

$todelete array_diff$files$imagenes );
foreach( 
$todelete as $file ) {
        
unlink$file );
}

?>
Saludos.