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?