epicoder
May 12th, 2010, 07:14 PM
For some reason, whenever I use glob() to search a directory for files, it will always return an empty array. To see if I had a syntax error, I made this very small test snippet...
<?php
foreach(glob('*.txt') as $file)
{
echo $file."\n";
}
?>
and put it in a directory with two text files in it. glob() still returned an empty array.
<?php
foreach(glob('*.txt') as $file)
{
echo $file."\n";
}
?>
and put it in a directory with two text files in it. glob() still returned an empty array.