As far as I can tell you can't have any spaces in the directory name when using opendir().
I've tried various methods to get round it including escaping the space character with "\ ".
Any ideas?
This works for me on my testing server:
$handle = opendir('test dir'); while( false !== ($file = readdir($handle)) ) { echo $file.'<br/>'; }