par
Invité » 02 juin 2005, 12:26
function liste($path)
{
$tableau = array();
$nbfichier = 0;
if ($dir = @opendir($path))
{
while($file = readdir($dir))
{
if ($file !="." && $file != "..")
{
if (is_dir($path."/".$file))
{
array_push($tableau, $file);
}
}
}
}
return $tableau;
}
$path='/var/www/html/www.monsite.com/achat/cache/temp';
liste($path);
print_r($tableau);
Salut tlm,
je veus lister mon repertoire temp mais mon $tableau reste deseperement vide ... any idea ??
ps : $path est le chemin du rep depuis la racine de mon serveur ... mon fichier de listage ce trouve lui dans /var/www/html/
www.monsite.com/robot/cron_flush_temp.inc
[php]function liste($path)
{
$tableau = array();
$nbfichier = 0;
if ($dir = @opendir($path))
{
while($file = readdir($dir))
{
if ($file !="." && $file != "..")
{
if (is_dir($path."/".$file))
{
array_push($tableau, $file);
}
}
}
}
return $tableau;
}
$path='/var/www/html/www.monsite.com/achat/cache/temp';
liste($path);
print_r($tableau);[/php]
Salut tlm,
je veus lister mon repertoire temp mais mon $tableau reste deseperement vide ... any idea ??
ps : $path est le chemin du rep depuis la racine de mon serveur ... mon fichier de listage ce trouve lui dans /var/www/html/www.monsite.com/robot/cron_flush_temp.inc