u can use the function
function GetDirArray($sPath)
{
//Load Directory Into Array
$handle=opendir($sPath);
while ($file = readdir($handle)) if(($file!=".")&($file!=".."))
$retVal[(isset($retVal))?count($retVal):0] = $file;
//Clean up and sort
closedir($handle);
sort($retVal);
return $retVal;
}
//
Just a suggestion: use exec("ls -1 root/articles/??_head.xml",$article_files) to
find out the files -- then walk $article_files, parse the file and echo whatever
you please. :-)
Bogdan
Martin Hughes wrote:
> Heya,
>
> Can PHP count the number of a certain ftile in a directory and then print
> t
Heya,
Can PHP count the number of a certain ftile in a directory and then print
the result to the screen? I have articles on my site that are in XML/XSL
format like:
root/articles/00_head.xml
00_body.xml
01_head.xml
01_body.xml
3 matches
Mail list logo