0
Thanks

A few words of thanks would be greatly appreciated.

PHP script listing file directory




Hello,
I am looking for a script which will give a list of files in a directory!
How can I do this??

You can use this:

function AffDir($rep)
{
$dir = opendir($rep);
while ($File = readdir($dir))
{
if($File != "." && $File != "..")
{
echo $File."<br>";
}
}
closedir($dir);
}

AffDir(".");
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « PHP script listing file directory », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

0 Comments