PHPCMS V9 image download extension implementation download field different server images

Source: Internet
Author: User
Tags website server zip

HPCMS found a feature called "image download", which was previously available in DEDECMS but did not know its purpose. I saw it again when I changed it to PHPCMS, so I took a closer look, what is it. After some experiments, I learned what role it plays.

In the PHPCMS download model, when the download content is added, there is an item called "image download". At first I thought it was a remote attachment function, that is, after the configuration, you can directly upload attachments to the configured remote server. This is not the answer, but I still don't understand it.

Today, I studied the download model of PHPCMS again and finally understood it. The final result is the same as the remote attachment I mentioned above, but it is not an attachment uploaded here, but a so-called server image.

In addition to the web server where your PHPCMS is located, image downloading includes more than one download server and placing the same file to be downloaded on different servers. These servers only have different domain names, both folders and files (that is, relative paths) are the same. You only need to set the URL prefix and combine the URL prefix with the relative path of the files on the server, you can obtain the absolute download path of the specified files on these servers.

For example, if you have downloaded a compressed package file named myfiles.zip, the relative path on the server is "/web/down/myfiles.zip". You have three servers:

The code is as follows: Copy code
    • Download Image 1: your domain name 1 ~
    • Download Image 2: your domain name 2
    • Download image 3: your domain name 3
    • You only need to set up three Download image servers by: extension & rarr; download image management, enter the "image site name" as required, and name the server by yourself, however, this name is displayed in the download list on the final download page. "Image site address" is to set the prefix of your download URL, that is, the above three addresses. Note that "/" cannot be added at the end. Click "add.

On the page for adding download content, the three Download image addresses you just added will be displayed in the "image server list" under "image download, then, enter the file path "/web/down/myfiles.zip" in the input box below, as shown in the left figure below. Complete other required items to release the software. View the released software download page. You can see the download point of the added image in the download list, as shown in the right figure below.

View the actual download path. You can see that the absolute download path is your domain name/web/down/myfiles.zip, and so on. The remaining two Download points are: your domain name/web/down/myfiles.zip and your domain name/web/down/myfiles.zip.

The advantage of image downloading is that the same file can be stored on different servers, reducing the load on your website server.

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.