How to display image from database using php

前端 未结 11 2712
闹比i
闹比i 2020-11-27 21:43

I am trying to display an image coming from the database and I was not able to display the image .but its showing like this user-1.jpg Please see my code can on

11条回答
  •  时光说笑
    2020-11-27 22:24

    instead of print $image; you should go for print ">"

    and note that $image should contain the path of your image.

    So, If you are only storing the name of your image in database then instead of that you have to store the full path of your image in the database like /root/user/Documents/image.jpeg.

提交回复
热议问题