输入banner图图片脚本导航/分类

phpgetimagesize函数获取图片宽高信息

  1. $images_array = array("http://static.zend.com/img/logo.gif");
  2. foreach($images_array as $image)
  3. {
  4. list($width, $height, $type, $attr) = getimagesize($image);
  5. $new_height = (int)(192 / $width * $height);
  6. echo '
  7. ';
  8. }