Need Help Understanding this PHP Code

前端 未结 5 1565
感情败类
感情败类 2021-01-23 07:48

i am aware of the basics like what is a function, a class, a method etc. however i am totally confused on what exactly the below code does to read the image, i read it somewhere

5条回答
  •  轮回少年
    2021-01-23 08:35

    If you just want to display the image, all of the above is irrelevant. You just need to write out an HTML image tag, e.g.

    echo '';
    

    That's it.

    The code that you have given takes a very long and inconvenient way to load an image for manipulation using the GD library; that's almost certainly not what you wanted to do, but if you did, then you could use imagecreatefromjpeg instead.

提交回复
热议问题