RE: [PHP] readdir and mime types

From: Date: Tue, 22 Nov 2005 15:05:49 +0000
Subject: RE: [PHP] readdir and mime types
Groups: php.general 
Request: Send a blank email to php-general+get-226276@lists.php.net to get a copy of this message
[snip] > If file exists is looking for an associated files is it probable that the > .mpg files do not have one associated with it in the other directory? It is probable, that's why the check is there, but in this case the associated file(s) definitely does exist. If I simply change the file extensions from mpg to avi the script works. [/snip] Try this simple example and see what is output... if ($handle = opendir('/path/to/files')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle); }

« previous php.general (#226276) next »