Hi all,
I'm a newbie at PHP but fairly well versed in Perl.
I'm trying to read the folder names in a specific directory with the following :-
<!-- readDirs.php -->
<!-- place in root of vf site -->
<!-- Delete this file when done -->
<BODY>
<?php
$dir="samples/";
$dirs=opendir($dir);
while ($file=readdir($dirs)) {
if(is_dir($file)) {
if( ($file == ".") || ($file == "..") ) {
continue;
}
print("$file<br>");
}
}
?>
</BODY>
This script misses the first folder in the samples/ directory, which is 'august1499'
but correctly reports the rest. This is the printout it produced:-
banners
feb2000
sept1599
thumbnails
thumbpage2
thumbpage1
thumbpage3
thumbpage4
Any ideas?
Thanks,
Paul.