How is an image structured like a piece of information implemented?

Source: Internet
Author: User
Example: my website also collects articles. how is the image format like this achieved? Simply put, it is how to save the collected images. what is the logic of the image. php displayed on the front end? Maybe my expression is not clear enough. what I want is that the server already has images, but at the front end I also want...

Example: my website also collects articles. how is the image format like this achieved?
Simply put, it is how to save the collected images. what is the logic of the image. php displayed on the front end?

Maybe my expression is not clear enough. what I want is that the server already has images, but I also want to use image. php on the front end? Url = xxxxxxx is used to display images. Therefore, what is the logic of image. php?

Reply content:

Example: my website also collects articles. how is the image format like this achieved?
Simply put, it is how to save the collected images. what is the logic of the image. php displayed on the front end?

Maybe my expression is not clear enough. what I want is that the server already has images, but I also want to use image. php on the front end? Url = xxxxxxx is used to display images. Therefore, what is the logic of image. php?

First, each image requires an id, suchhajhdjs
Then url? Id = hajhdjs
The background obtains the corresponding image based on the id, and then uses
Imagepng (): The function outputs an image.

It is equivalent to outputting images dynamically. the parameter string following it locates the image position.
There are many ideas:

  1. Directly use nginx to intercept and redirect parameters to other URLs

  2. Php obtains the local path image based on parameters and outputs

1. the backend outputs image files based on parameters.
2. set the response headerContent-Type: image/png

Set MIME Types in PHP.echoOutput the image content.

The server (php) receives parameters, obtains the real link characters of the image, concatenates the complete link url, and then echo file_get_contents (url)

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.