How to copy a file from web server to the client's workstation?
I tried the following: copy("file.txt", "C:\TEMP\")
The function returns true but there is no file.txt copied/created in C:\TEMP.
What could be the problem? Any idea?
"I tried the following: copy("file.txt", "C:\TEMP\")"
That is obviously impossible.
The only thing you can do is offer the file as a download for the client, and the client will decide if he want's to download it, and where he will store the file.
sure, you have to send that file to the client via the browser and the client has to chose "save to disk". it would be rather dangerous if you could just copy it to the client...
send the file with the header Content-Type: as the type of document you want to send and next output the document...