! How does PHP display multiple images of a database?
Source: Internet
Author: User
Help !! How does PHP display multiple images in the database as shown in the following figure. I have saved the image to the database .. How can I display these images on the page ., Pass the id one at a time. By the way, if your php version is 5.3 or later, be careful with the notice-level error $ row ['filetype']. read for help !! How does PHP display multiple images in the database?
As the question. I have saved the image to the database .. Now how can I display these images to the page.
------ Solution --------------------
Transfer id, one at a time
------ Solution --------------------
By the way, if your php version is 5.3 or later, you must be careful with the notice-level error $ row ['filetype'].
When reading images, no output is allowed, including php errors.
------ Solution --------------------
If the window environment is used, the image data is damaged.
Fopen ($ _ FILES ['photo'] ['tmp _ name'], "r ")
To write
Fopen ($ _ FILES ['photo'] ['tmp _ name'], "rb ")
Writing is safe.
$ Data = addslashes (file_get_contents ($ _ FILES ['photo'] ['tmp _ name']);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service