Home >Backend Development >PHP Tutorial >How to implement the functions of uploading pictures and displaying pictures_PHP tutorial
How to implement the function of uploading pictures and displaying pictures
How to implement the function of uploading pictures and displaying pictures (preferably with code), thank you
Let me answer
Website ideas and solutions
faint. . . Upload and then save the path to the database or directly delete the image path. . There are too many uploaded codes move_uploaded_file
Website ideas and solutions
I know how to use this function move_uploaded_file to upload pictures to a folder, but I don’t know how to display pictures and add them to the database
Website ideas and solutions
You save the name of the photo in the database, and then when displaying it, first locate the path you passed to it, and then add the name of the photo taken out from the database!
Website ideas and solutions
When you use move_uploaded_file, doesn’t it have a file name? That is the address of the image. Wouldn’t it be ok to output it directly?
Website ideas and solutions
There is such a code in uhome, photo album