How is a picture with a structure like Yidianxin realized?
Such as the title: My website also collects articles. How do I implement such a picture format?
To put it simply, how to save the collected pictures? What is the logic of image.php displayed on the front end?
Maybe my expression is not clear enough. What I want is that the server already has pictures, but on the front end I also want to display pictures in the form of image.php?url=xxxxxxx, so I want to ask what the logic of this image.php is. ?
Reply content:
Such as the title: My website also collects articles. How do I implement such a picture format?
To put it simply, how to save the collected pictures? What is the logic of image.php displayed on the front end?
Maybe my expression is not clear enough. What I want is that the server already has pictures, but on the front end I also want to display pictures in the form of image.php?url=xxxxxxx, so I want to ask what the logic of this image.php is. ?
First, each picture needs its own id, such as hajhdjs
Then url?id=hajhdjs
The background gets the corresponding picture based on the id, and then uses the
imagepng() function to output the picture
It’s equivalent to dynamically outputting the picture, and the following series of parameters locate the position of the picture.
Many ideas:
Directly use nginx to intercept and redirect parameters to other urls
php gets the local path image based on the parameters and outputs
1. The backend outputs the image file according to the parameters
2. Set the response header Content-Type: image/png
PHP Set MIME Types and you can echo
output the image content.
The server (php) receives the parameters, gets the characters related to the real link of the picture, and finally splices out the complete link url, and then echo file_get_contents(url)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.
