Home >Backend Development >PHP Tutorial >How to implement the functions of uploading pictures and displaying pictures_PHP tutorial

How to implement the functions of uploading pictures and displaying pictures_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:52:201348browse




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


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632511.htmlTechArticleHow to implement the function of uploading pictures and displaying pictures How to implement the functions of uploading pictures and displaying pictures (preferably with code), thank you Let me answer the website suggestions and solutions. . . Upload...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn