Deprecated: Assigning the return value of new by reference is deprecated in /membri/echoweb/wp-settings.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /membri/echoweb/wp-settings.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /membri/echoweb/wp-settings.php on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /membri/echoweb/wp-settings.php on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /membri/echoweb/wp-settings.php on line 18
Php: Elenco file dentro cartelle at ECHOWEB


Php: Elenco file dentro cartelle

Con questo codice è possibile creare un elenco dei file contenuti in una cartella, usando o no un filtro sull’estensione…

<?php
$list = glob("*.txt"); // si puo' anche usare glob("doc/soft/img/*.txt");
if($list[0]!='')
{
	foreach ($list as $filename)
	{
		echo "$filename size " . filesize($filename) . "<br />";
	}
}
else
{
	echo "Nessun riscontro";
}
?>

L’esito si presenta così:

funclist.txt size 44686
funcsummary.txt size 267625
quickref.txt size 137820



1 Response to “Php: Elenco file dentro cartelle”


  1. 1 Pasquale

    Test

Leave a Reply