Results 1 to 3 of 3

Thread: How to export TXT file on server to clipboard?

  1. #1
    Join Date
    Jan 2006
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to export TXT file on server to clipboard?

    How to export TXT file on server to clipboard?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Er, no, not really. The clipboard is part of X, and most servers don't run a graphical interface.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •