Voting

: zero plus three?
(Example: nine)

The Note You're Voting On

citizenmarco at gmail dot com
9 years ago
Note that there quite a few articles on the net that imply that commands like is_dir, opendir, readdir cannot read paths with spaces.

On a linux box, THAT is not an issue.

Sample test code;

$dir = "Images/Soma ALbum Name with spaces";


echo $dir."<br/>";

// Open a directory, and read its contents
if (is_dir($dir)){
echo $dir."<br/>"; // will not appear if above fails
if ($dh = opendir($dir)){
echo $dir."<br/>"; // will not appear if above fails
while (($file = readdir($dh)) !== false){
echo "filename:" . $file . "<br>";
echo $dir."<br/>"; // will not appear if above fails
}
closedir($dh);
}
}

<< Back to user notes page

To Top