View Full Version : How to export TXT file on server to clipboard?
toplisek
03-21-2009, 07:48 PM
How to export TXT file on server to clipboard?
djr33
03-21-2009, 08:11 PM
You can't.
You can use file_get_contents('FILENAME') to get the data in the file, but you cannot put it on the user's clipboard because that is not allowed in the browser. Even if it was, you couldn't do it in PHP because that is just operating on the server. You would need to use javascript, flash or something else working inside the browser, not on the server.
If you actually meant the clipboard of the server, I really have no idea, but you could probably do it with some sort of linux command using exec('CMD') and including the text in the exec() call.
Er, no, not really. The clipboard is part of X, and most servers don't run a graphical interface.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.