Ver Mensaje Individual
  #7 (permalink)  
Antiguo 07/12/2006, 17:45
Avatar de B**
B**
 
Fecha de Ingreso: enero-2006
Ubicación: Monterrey,Mexico
Mensajes: 952
Antigüedad: 18 años, 3 meses
Puntos: 3
Re: Calcular el número de archivos en carpeta

Creo que con DirectoryIterator es mas eficiente y sencillo:
Código PHP:
<?php
/*
 * Created on 7/12/2006
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 *
 */
$dir = new DirectoryIterator('/Servidor/WEB/php/POO');//Aqui se indica la ruta
$num=0;
while(
$dir->valid()) {
   if(!
$dir->isDot()) {
       
$num++;
       print 
$dir->isFile()."<br />";
   }
   
$dir->next();
}
print
"Total de archivos : $num";
?>
__________________
-URL= Go PHP5.
-Age=22.
-Learning=PHP,J2EE,Struts,MAMBO,C++,JSON,AJAX,XHTML ,CSS.