Re: Displaying Images form a Directory Posted by Jim Carlock on 12/04/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: Next in forum: Re: [PHP] Parsing through an Apache Log File?Prev in forum: Re: [PHP] Parsing through an Apache Log File?Thread view: Re: Displaying Images form a Directory

Copyright © 2005-2006 Powered by Custom PHP Programming