In message <[EMAIL PROTECTED]>, James
Keeline <[EMAIL PROTECTED]> writes
>--- Pete <[EMAIL PROTECTED]> wrote:
>
>> >> Does anyone have any suggestions as to find out how many pictures there
>> >> are on the server, with the pattern 'pix/1234*'  - and how I can go
>> >> through the file names?  
>> >
>> >this?
>> >
>> ><?php
>> >  $dh=opendir('pix/');
>> >  while ($f=readdir($dh))
>> >    if (preg_match("/^\d+_\d+.(jpg|jpeg|gif|png)$/i",$f)
>> >      echo "found image: $f\n";
>> >
>> >  closedir($dh);
>> >?>
>> 
>> [EMAIL PROTECTED] preg_match - I should have known (:->
>> 
>> Thanks for that.
>> 
>> Would you / anyone have any idea of whether this will slow down if there
>> are a lot of pictures - there could be up to 1000/1200 in each folder.

>It is often best to stay with the PHP functions if you want to maintain
>compatability to install the same program on Windows or *nix machines. 

>
>James
>_____
>
>James D. Keeline

This will be a function on a webpage, where an unknown number of
pictures (usually 0-10) relating to that page, must be displayed.  

I am splitting the pictures into separate folders (depending on the
reference given within that page), so that not too many appear in one
folder.  I have been given one folder with 90,000 images in one folder,
which is just a tad OTT.

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h5io1ko/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123002345/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to