Results 1 to 6 of 6

Thread: write to file on user's computer

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    write to file on user's computer

    I've been able to open a file on the webserver and write information to it, but I want to be able to write to a file on the user's computer. It's just a csv file and it's for a report. I'm using this:
    PHP Code:
       if (!$handle fopen('C:\\data\\info.csv'"w")) {
             echo 
    "Cannot open file ($filename)";
             exit;
       } 
    but that doesn't seem to work. Help?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    PHP is a server side langauge. Its executed at the server and no php is ever seen by the client.

    Also for you to be able to write files to the users computer would be a big security risk.

    If you still want to write files on the users computer then you could either create an ActiveX control or a java applet.

    What about a differet method.
    [list=A][*]You create a cookie on the users computer of thier ID and you store the data in a database on the server[*]You generate the file and prompt for the file to be downloaded by the user.[/list=1]

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Well, that was my next option.... which is what I guess I'll be doing.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83
    May someone point me the way to generate a file and prompt for the file to be downloaded by the user?

    Like an activeX installer?

    I am not even sure where to start looking, any help would be great!

    Much Thanks!!

    Julie Luvs


  5. #5
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Julie_Luvs
    May someone point me the way to generate a file and prompt for the file to be downloaded by the user?

    Like an activeX installer?

    I am not even sure where to start looking, any help would be great!

    Much Thanks!!

    What type of file?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6
    Lively Member Julie_Luvs's Avatar
    Join Date
    Apr 2004
    Location
    Paradise
    Posts
    83
    its an exe file that was compiled to an exe

    is this compatible?
    Julie Luvs


Posting Permissions

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



Click Here to Expand Forum to Full Width