Know how to download the file path from the browser (the file is a source file)

Source: Internet
Author: User
Know how to download the file path from the browser (the file is the source file). This post was last edited by u013293559 at 12:11:05 on February 10 ,.

Browser

Know how the file path can be downloaded from the browser (the file is the source file ......................


Reply to discussion (solution)

If there is no anti-Leech protection, the header Location is OK.

Can you send specific code? sorry !! No anti-theft

This is also an example?

 

The example in the manual can be written
Header ('Location: $ URL'); // how to obtain the url

Such as php .. It should not be downloaded ..
The download is also html

Php files cannot be downloaded. only front-end files such as html, js, and css can be downloaded.

I really don't want to understand. I mean there is a file or a compressed package on the server to get the path. I want to download this file and use php code to write it.

......
It looks like it is used as a client
File_get_contents ($ url) and fwrite to a local file.
The complexity is curl.

Header ('content-Disposition: attachment; filename = test. php ');
Readfile ('A. php'); // target file

 

Thank you for solving this problem.

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.