[PHP] Reading dir contents...

2002-05-13 Thread Ashley M. Kirchner
Take this function: function randomImg() { $numargs = func_num_args(); $ImgArray = array($numargs-1); $arg_list = func_get_args(); $ImgDir = $arg_list[0]; srand((double)microtime()*1234567); $img = $arg_list[rand(1,count($arg_list)-1)];

Re: [PHP] Reading dir contents...

2002-05-13 Thread Jason Wong
On Tuesday 14 May 2002 01:50, Ashley M. Kirchner wrote: Can PHP do this; open that directory, read its contents and use it (if so, how?) Or do I have to go to Perl for this? RTFM Directory functions -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems

Re: [PHP] Reading dir contents...

2002-05-13 Thread Jason Soza
Use opendir(), readdir(), and closedir() - http://www.php.net/manual/en/function.opendir.php HTH, Jason Soza - Original Message - From: Ashley M. Kirchner [EMAIL PROTECTED] Date: Monday, May 13, 2002 9:50 am Subject: [PHP] Reading dir contents... Take this function