You are here: Re: [PHP] readdir and mime types « PHP « IT news, forums, messages
Re: [PHP] readdir and mime types

Posted by "Richard Lynch" on 11/22/05 23:40

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация