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

Posted by Jameson on 09/26/31 11:36

Hi Jim:

Thanks a million for all of the help. I think my PHP installation isn't
set up right, because it seems like anything that I try do do with
images doesn't work very well.

I might try making a symbolic link (like a shortcut on Windows) in the
directory. I know it isn't as ideal as if I could get the directory
parth to wrok with the glob() function, but it might be all I've got at
this point.

I'm glad you got your mime_content_type to work. Sometimes we get lucky
and it turns out to be as simple as uncommenting a line.

Thanks again for all of the help!

Jameson

Jim Carlock wrote:
> 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

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