How does php save files to the client?

Source: Internet
Author: User
How does php save files to the client? Log on to the backend management system with a client. the server has a save button remotely and in the & nbsp; directory. a txt file is generated in the server segment after you click it. But I don't need to generate it in the server segment. I just want to generate it on the client, what should I do? & Nbsp; I heard how to save files to the client using Ac php?
Use a client to log on to the background management system,
There is a Save button. after clicking it, a txt file will be generated in the server segment. But I don't need to generate it in the server segment, I just want it to generate on the client,
What should I do?
I heard that ActiveXObject is used. I am a dish and I am not familiar with JS. which Big Brother can help me solve this problem?
Code that can be used?

------ Solution --------------------
The following code generates a txt file and downloads it to the client.
PHP code
  
------ Solution --------------------
No trace left on the server side ~ You can use the above code to write a php script and run it.
Discussion
Back upstairs, didn't the generated txt need to be saved to the server first and then downloaded to the client?
I cannot leave traces on the server now... What should I do?

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.