You are here: Re: only list dirs if they have jpgs inside « PHP Programming Language « IT news, forums, messages
Re: only list dirs if they have jpgs inside

Posted by Toby A Inkster on 08/01/07 20:54

J. Frank Parnell wrote:

> Works great, thanks! Could you explain 'bit of a cheat'? Am I going to
> get caught? :)

It calls two external programs in the background: "find" and "sort". You
will get caught if you use a non-Linux web host, as it may not have these
installed. Even other Unix flavours may cause problems as it specifically
relies on the GNU version of "find". (Non-Linux machines usually have the
BSD version of "find".)

> find_dirs_with_jpegs () seems faster

It probably will be: particularly for larger directories. "find" and
"sort" are written in C by some very smart people who have optimised them
very well.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 42 days, 24 min.]

demiblog 0.2.2 Released
http://tobyinkster.co.uk/blog/2007/07/29/demiblog-0.2.2/

 

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

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