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

  • Call of Duty 4 Mod Tools
  • Cancellare tutti i file vecchi
  • Splashimages GRUB
  • Formattare i numeri con printf()
  • Ripristinare grub

Tag Cloud

array_keys array_values BBCode BBCodes boot contare files cURL DictionaryEntry download grub 2 grub2 Hashtable HTTP ICollection Libre Office linux liveCD MySQL opendir Open Office 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

  • marzo 2012
  • 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-2012 Andrea Falco
Tema di NeoEase. XHTML 1.1 e CSS 3 convalidati.