Saturday, 9 July 2011

PHP Image width and height get

<?php

list($width$height$type$attr) = getimagesize("img/flag.jpg");
print $width;
print $height;
print $type ;
print $attr;
echo 
"<img src=\"img/flag.jpg\" $attr alt=\"getimagesize() example\" />";?>



.htaccess and from phpInfo I see that it's now using php5. Great!
AddHandler application/x-httpd-php5 .php 

AddHandler application/x-httpd-php5 .php
AddType application/x-httpd-php5 .php 

No comments:

Post a Comment

Source base installation of php, mysql and apache in ubuntu/ linux

Compile and Install a LAMP(Linux/Apache/MySQL/PHP) Server from Source In the last post, I described the method to install a LAMP ser...