Andrea Falco

Note e consigli vari
  • Home
  • Info

Archivio

Posts Tagged ‘contare files’

Contare il numero di files in una directory

15 novembre 2009 Andrea Falco Nessun commento
$count = 0;
$hd = opendir("percorso/vostra/directory");

while(($file = readdir($hd)) !== false) {
	//Se i file sono nascosti non gli conta
	if ($file[0] != ".") $count++;
}
echo $count; //stampa a video il numero totale di files

Tratto da http://www.sastgroup.com/tutorials/php-contare-il-numero-di-files-in-una-directory

Categorie:PHP Tag: contare files, opendir, PHP, readdir
RSS
Twitter

Random Posts

  • Installare Web Server su Ubuntu
  • Gestire BBCode in PHP
  • System.Collections.Hashtable
  • Cercare Parole Dentro File Da Terminale Bash
  • Decomprimere file .gz

Tag Cloud

array_keys array_values BBCode BBCodes boot contare files cURL DictionaryEntry download grub2 grub 2 Hashtable HTTP ICollection linux liveCD MySQL opendir PHP printf() readdir REPLACE str_replace System.Collections System.Collections.Hashtable ubuntu watermark

Categories

  • Senza categoria
  • Tutorials

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Archives

  • gennaio 2011
  • ottobre 2010
  • luglio 2010
  • aprile 2010
  • gennaio 2010
  • novembre 2009
  • ottobre 2009
  • settembre 2009
  • luglio 2009

Meta

  • Collegati
Vai su WordPress
Copyright © 2009-2011 Andrea Falco
Tema di NeoEase. XHTML 1.1 e CSS 3 convalidati.