Home > Backend Development > PHP Tutorial > php getimagesize function gets image size

php getimagesize function gets image size

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 08:51:50
Original
1148 people have browsed it
  1. /* 1.jpg The image whose size is to be obtained*/
  2. $arr = getimagesize("1.jpg");
  3. /**
  4. * Here $arr is an array type
  5. * $arr[0] is the width of the image
  6. * $arr[1] is the height of the image
  7. * $arr[2] is the format of the image, including jpg, gif, png, etc.
  8. * $arr[3] is the width and height of the image, and the content is width="xxx" height="yyy"
  9. */
  10. /* The following output Same content*/
  11. echo "";
  12. echo "";
  13. ?>
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template