AW: [PHP] image file check??
| From: | Jochen Kächelin | Date: | Wed, 30 Aug 2000 12:51:22 +0000 |
| Subject: | AW: [PHP] image file check?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14390@lists.php.net to get a copy of this message | ||
use this construct:
$dim = GetImageSize($picture);
$width=$dim[0];$height=$dim[1];$picture_type=$dim[2];
echo "<img src='$picture' $dim[3]>\n";
these are the different picture_types:
$type[1]="GIF";$type[2]="JPG";$type[3]="PNG";$type[4]="SWF";
--> echo "PICTURE-TYPE is : $type[$picture_type]\n";
> -----Ursprüngliche Nachricht-----
> Von: Worawisut Pinyoyang [mailto:s0010684@kmitl.ac.th]
> Gesendet am: Mittwoch, 30. August 2000 14:47
> An: php-general@lists.php.net
> Betreff: [PHP] image file check??
>
>
> my program allow user to upload image files.
> how do i know that file (user upload) is an image file (*.jpg , *.gif)
> (avoid uploading file such as *.mp3 *.zip)
>
>
> Thank you very much
>
> Worawisut
>
>
>
> --
> 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
>