Through the PHP code to convert the image into the HTML page
- The PHP code is written for uploading file.If you want to use in other scenes,please delete the first few lines code about judge upload files,and modify the value of
$path
- You need to open theGD extension,and set the value of
short_open_tag
- You'd better use the PHP version greater than or equal to the 5.5 version, otherwise you do not support some format images(
webp
,bmp
and so on) - If you want to process bmp images, you must use a PHP version greater than or equal to
7.2
.But I did not add the relevant code because I used PHP 5.6