How to get image details using php

Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

How to get image details using php

Post by Neo » Sun Apr 25, 2010 3:36 am

Try this code.

Code: Select all

<?php
$img = "images/empty.gif";

list($width, $height, $type, $attr) = getimagesize($img);

print "Width : $width and height = $height";
?> 
Post Reply

Return to “PHP & MySQL”