RE: [PHP] using GetImageSize in a directory of images
| From: | scott [gts] | Date: | Wed, 11 Jul 2001 20:14:14 +0000 |
| Subject: | RE: [PHP] using GetImageSize in a directory of images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57486@lists.php.net to get a copy of this message | ||
try this:
$files = opendir($dir) or die("Cannot opendir $dir");
while ($file = readdir($files)) {
// do whatever
}
> -----Original Message-----
> From: Rory O'Connor [mailto:midget@elaris.com]
> Sent: Wednesday, July 11, 2001 3:09 PM
> To: php-general@lists.php.net
> Subject: [PHP] using GetImageSize in a directory of images
>
>
> recent posts introduced me to the handy GetImageSize, and it's just what
> I need! What I want to do is write a script that will go through a
> directory of images and write [image name];[image dimensions] to a file
> so I can query that into my products database for dynamic use on my
> site.
>
> BUT, i'm a super-duper PHP newbie and i'm unfamiliar with the syntax for
> looping thru all fils in a given directory. Can anyone point me in the
> right direction?
>
> Thanks so much!
>
>
>
> providing the finest in midget technology
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>