PHP development thumbnail open file

<?php
/*打开图片*/
$src = "https://img.php.cn/upload/course/000/000/004/581454f755fb1195.jpg";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom{$type}";
$image = $fun($src);
?>

is similar to before, open the picture, pass in the picture to get the picture information, and then create an identical picture in the memory. coexist.

Continuing Learning
||
1
2
3
4
5
6
7
8
<?php
/**/
$src = "https://img.php.cn/upload/course/000/000/004/581454f755fb1195.jpg";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom{$type}";
$image = $fun($src);
?>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
图片放大关闭