You are here: Re: Displaying Images form a Directory « PHP « IT news, forums, messages
Re: Displaying Images form a Directory

Posted by Jim Carlock on 10/21/24 11:36

Hello again,

I finally got the mime_magic stuff to work. I ended up
editing php.ini to get it to work.

The following line was commented out so all I did was
uncomment it.

extension=php_mime_magic.dll

Also, I had to add a section with the following item:

[mime_magic]
mime_magic.magicfile = "C:\path\to\PHP\install\extras\magic.mime"

The following code works very well, but I still like the glob()
function more.

// view the mime type
$rpn = "23939.jpg";
echo mime_content_type($rpn);

returns "image/jpeg". Also, if the file is named 23939 without
the .jpg extension, mime_content_type('23939'); also returns
"image/jpeg". I tested dropping the extension on a .gif file as
well and it correctly returned, "image/gif".

Hope this helps.

Jim Carlock
Post replies to the newsgroup.

 

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

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