how to save files to user's local harddrive
hi all, I tried to save data to a text file on the user's local hard drive, here's the code:
VB Code:
$filename = "D:\savefile " .date("Y-m-d, h-i-s") . ".txt";
$fh = fopen($filename, "a");
$success = fwrite($fh, $data);
fclose($fh);
but why is it on on the user's local harddrive? it's on the hosting's drive.
how can I make it save to the user's local harddrive?
thanks
Re: how to save files to user's local harddrive
You can't do that. Sorry.
PHP runs on the server, so it will always create the file on the server. For security reasons, you cannot create a file on the users system.
Re: how to save files to user's local harddrive
PHP won't let you because it is server side...