Re: readdir and mime types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, November 22, 2005 8:23 am, Graham Cossey wrote:
> I'm attempting to read a list of files in a directory using readdir()
> but am having problems with mpeg files not seemingly being read.
>
> Cope snippet:
>
> 	$count = 0;
> 	while (false !== ($file = readdir($open_dir)))
> 	{
>         if ($file != '.' && $file != '..')
>         {
>             if (file_exists("$VID_DIR/$file"))

What is $VID_DIR?

What directory is $open_dir pointing to?

Dollar gets you 10 that at least one of them is not what you think it is.

>             {
> 				$count++;
>
> $count counts any 'avi' files but not 'mpg' files.
>
> Any suggestions much apreciated.

It's also remotely possible that your 'mpg' files are not readable by
the PHP user or something weird like that...  Though I don't THINK you
can do this, it's possible that your OS allows it...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux