Hi,
This is me again..
Is it possible to let php code writes on the client side.. I've written a code which asks users to fill up some fields and then the code should creates a file with the data they filled under their c: drive. What happened to me, the data were filled ok but the file was created under the server c: drive?
I hope the question is clear! and please ask for any clarifications if requires..
Regards.
Creating Files !
Moderator: General Moderators
-
phpbeginer
- Forum Newbie
- Posts: 8
- Joined: Sun Feb 15, 2004 1:24 am
You can't write direct to a clients harddrive, this would be a Very Bad Thing[TM] if you could.
What you can do though is create the file on the server and offer that file as a download to the client (so a box pops up saying Open, Save Cancel etc..). If this is ok then see http://php.net/header around the line starting with "If you want the user to be prompted to save the data you are sending...."
What you can do though is create the file on the server and offer that file as a download to the client (so a box pops up saying Open, Save Cancel etc..). If this is ok then see http://php.net/header around the line starting with "If you want the user to be prompted to save the data you are sending...."
-
phpbeginer
- Forum Newbie
- Posts: 8
- Joined: Sun Feb 15, 2004 1:24 am
Yes, it is a bad thing to write on the client machine! That would make hacking very easy through PHP 
I Think what you suggested is really what I need, I just finished writing the batch file that will ask the user about some information and store it in his harddrive. I will use the download link to allow user run the batch from his side...
Thanks a lot Mark..
I Think what you suggested is really what I need, I just finished writing the batch file that will ask the user about some information and store it in his harddrive. I will use the download link to allow user run the batch from his side...
Thanks a lot Mark..